From 5b941238fe1a0b015ff6519a6287ce1eae4fb8c9 Mon Sep 17 00:00:00 2001 From: Roland Stigge Date: Thu, 6 Sep 2012 11:39:18 +0200 Subject: ARM: LPC32xx: Provide DMA filter callbacks via platform data The SLC and MLC NAND drivers now need their dma_filter callbacks via platform data to make them independent of single DMA engine drivers. (This also helps fixing build errors of the SLC and MLC drivers when building as modules because direct access to AMBA dma filter functions isn't available via export.) Signed-off-by: Roland Stigge Acked-by: Arnd Bergmann --- arch/arm/mach-lpc32xx/phy3250.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'arch/arm/mach-lpc32xx/phy3250.c') diff --git a/arch/arm/mach-lpc32xx/phy3250.c b/arch/arm/mach-lpc32xx/phy3250.c index b07dcc90829d..a4a43b3684ef 100644 --- a/arch/arm/mach-lpc32xx/phy3250.c +++ b/arch/arm/mach-lpc32xx/phy3250.c @@ -37,6 +37,8 @@ #include #include #include +#include +#include #include #include @@ -223,6 +225,14 @@ static struct mmci_platform_data lpc32xx_mmci_data = { * gather, and the MMCI driver doesn't do it this way */ }; +static struct lpc32xx_slc_platform_data lpc32xx_slc_data = { + .dma_filter = pl08x_filter_id, +}; + +static struct lpc32xx_mlc_platform_data lpc32xx_mlc_data = { + .dma_filter = pl08x_filter_id, +}; + static const struct of_dev_auxdata lpc32xx_auxdata_lookup[] __initconst = { OF_DEV_AUXDATA("arm,pl022", 0x20084000, "dev:ssp0", &lpc32xx_ssp0_data), OF_DEV_AUXDATA("arm,pl022", 0x2008C000, "dev:ssp1", &lpc32xx_ssp1_data), @@ -230,6 +240,10 @@ static const struct of_dev_auxdata lpc32xx_auxdata_lookup[] __initconst = { OF_DEV_AUXDATA("arm,pl080", 0x31000000, "pl08xdmac", &pl08x_pd), OF_DEV_AUXDATA("arm,pl18x", 0x20098000, "20098000.sd", &lpc32xx_mmci_data), + OF_DEV_AUXDATA("nxp,lpc3220-slc", 0x20020000, "20020000.flash", + &lpc32xx_slc_data), + OF_DEV_AUXDATA("nxp,lpc3220-mlc", 0x200a8000, "200a8000.flash", + &lpc32xx_mlc_data), { } }; -- cgit v1.2.3 From 7a5deff68f9e0a1db170ac9dd3b2b4aaddc1b80c Mon Sep 17 00:00:00 2001 From: Roland Stigge Date: Thu, 6 Sep 2012 11:39:29 +0200 Subject: ARM: LPC32xx: Remove board specific GPIO init This patch removes a board specific GPIO initialization (for MMC power) from the platform initialization. On the reference boards (PHY3250 and EA3250), this separate initialization is not necessary, now reducing board specific initialization in the platform init of phy3250.c. Signed-off-by: Roland Stigge --- arch/arm/mach-lpc32xx/phy3250.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'arch/arm/mach-lpc32xx/phy3250.c') diff --git a/arch/arm/mach-lpc32xx/phy3250.c b/arch/arm/mach-lpc32xx/phy3250.c index a4a43b3684ef..8f2a2f8712d7 100644 --- a/arch/arm/mach-lpc32xx/phy3250.c +++ b/arch/arm/mach-lpc32xx/phy3250.c @@ -267,12 +267,6 @@ static void __init lpc3250_machine_init(void) of_platform_populate(NULL, of_default_bus_match_table, lpc32xx_auxdata_lookup, NULL); - - /* Register GPIOs used on this board */ - if (gpio_request(MMC_PWR_ENABLE_GPIO, "mmc_power_en")) - pr_err("Error requesting gpio %u", MMC_PWR_ENABLE_GPIO); - else if (gpio_direction_output(MMC_PWR_ENABLE_GPIO, 1)) - pr_err("Error setting gpio %u to output", MMC_PWR_ENABLE_GPIO); } static char const *lpc32xx_dt_compat[] __initdata = { -- cgit v1.2.3 From 632cbbcf0e80f2e2dcf94b8e4d05dd03eda90a06 Mon Sep 17 00:00:00 2001 From: Roland Stigge Date: Tue, 25 Sep 2012 10:15:41 +0200 Subject: ARM: LPC32xx: Board cleanup This patch removes now unnecessary spi includes. Signed-off-by: Roland Stigge --- arch/arm/mach-lpc32xx/phy3250.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'arch/arm/mach-lpc32xx/phy3250.c') diff --git a/arch/arm/mach-lpc32xx/phy3250.c b/arch/arm/mach-lpc32xx/phy3250.c index 8f2a2f8712d7..5663a9a943f7 100644 --- a/arch/arm/mach-lpc32xx/phy3250.c +++ b/arch/arm/mach-lpc32xx/phy3250.c @@ -24,8 +24,6 @@ #include #include #include -#include -#include #include #include #include -- cgit v1.2.3 From a4bc78785190d1b59c28b823de8389f3555380cc Mon Sep 17 00:00:00 2001 From: Roland Stigge Date: Tue, 25 Sep 2012 10:15:49 +0200 Subject: ARM: LPC32xx: Platform update for devicetree completion of spi-pl022 spi-pl022 got a further update to its devicetree support, completing properties such that no platform data is necessary anymore. This patch adjusts phy3250.c accordingly: The supplied platform data is deleted. However, OF_DEV_AUXDATA() are still necessary due to device naming ("dev:ssp0"). Signed-off-by: Roland Stigge Acked-by: Alexandre Pereira da Silva Acked-by: Linus Walleij --- arch/arm/mach-lpc32xx/phy3250.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'arch/arm/mach-lpc32xx/phy3250.c') diff --git a/arch/arm/mach-lpc32xx/phy3250.c b/arch/arm/mach-lpc32xx/phy3250.c index 5663a9a943f7..e8ff4c3f0566 100644 --- a/arch/arm/mach-lpc32xx/phy3250.c +++ b/arch/arm/mach-lpc32xx/phy3250.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -156,21 +155,6 @@ static struct clcd_board lpc32xx_clcd_data = { .remove = lpc32xx_clcd_remove, }; -/* - * AMBA SSP (SPI) - */ -static struct pl022_ssp_controller lpc32xx_ssp0_data = { - .bus_id = 0, - .num_chipselect = 1, - .enable_dma = 0, -}; - -static struct pl022_ssp_controller lpc32xx_ssp1_data = { - .bus_id = 1, - .num_chipselect = 1, - .enable_dma = 0, -}; - static struct pl08x_channel_data pl08x_slave_channels[] = { { .bus_id = "nand-slc", @@ -232,8 +216,8 @@ static struct lpc32xx_mlc_platform_data lpc32xx_mlc_data = { }; static const struct of_dev_auxdata lpc32xx_auxdata_lookup[] __initconst = { - OF_DEV_AUXDATA("arm,pl022", 0x20084000, "dev:ssp0", &lpc32xx_ssp0_data), - OF_DEV_AUXDATA("arm,pl022", 0x2008C000, "dev:ssp1", &lpc32xx_ssp1_data), + OF_DEV_AUXDATA("arm,pl022", 0x20084000, "dev:ssp0", NULL), + OF_DEV_AUXDATA("arm,pl022", 0x2008C000, "dev:ssp1", NULL), OF_DEV_AUXDATA("arm,pl110", 0x31040000, "dev:clcd", &lpc32xx_clcd_data), OF_DEV_AUXDATA("arm,pl080", 0x31000000, "pl08xdmac", &pl08x_pd), OF_DEV_AUXDATA("arm,pl18x", 0x20098000, "20098000.sd", -- cgit v1.2.3