mxc_udc: add workaround for ENGcm09152 for i.MX25
Subsystems (7)
PATCH 1/19 mxc_udc: add workaround for ENGcm09152 for i.MX25
this patch gives the possibility to workaround bug ENGcm09152 on i.MX25 when the hardware workaround is also implemented on the board.
It covers the workaround described on page 42 of the following Errata :
http://cache.freescale.com/files/dsp/doc/errata/IMX25CE.pdf
--- drivers/usb/gadget/fsl_mxc_udc.c | 22 +++++++++++++--------- 1 files changed, 13 insertions(+), 9 deletions(-)
drivers/usb/gadget/fsl_mxc_udc.c +13 -9
@@ -23,7 +23,7 @@static struct clk *mxc_ahb_clk;static struct clk *mxc_usb_clk; -/* workaround ENGcm09152 for i.MX35 */ +/* workaround ENGcm09152 for i.MX25/35 */ #define USBPHYCTRL_OTGBASE_OFFSET 0x608#define USBPHYCTRL_EVDO (1 << 23)
@@ -89,16 +89,20 @@ eenahb:void fsl_udc_clk_finalize (struct platform_device *pdev) {struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data; -if (cpu_is_mx35 ()) { +if (cpu_is_mx25 () ||cpu_is_mx35 ()) {unsigned int v; - -/* workaround ENGcm09152 for i.MX35 */ +void __iomem *otgbase; +if (cpu_is_mx25 ()) + otgbase =MX25_IO_ADDRESS (MX25_USB_BASE_ADDR + +USBPHYCTRL_OTGBASE_OFFSET ); +else if (cpu_is_mx35 ()) + otgbase =MX35_IO_ADDRESS (MX35_USB_BASE_ADDR + +USBPHYCTRL_OTGBASE_OFFSET ); + +/* workaround ENGcm09152 for i.MX25/35 */ if (pdata->workaround &FLS_USB2_WORKAROUND_ENGCM09152 ) { - v =readl (MX35_IO_ADDRESS (MX35_USB_BASE_ADDR + -USBPHYCTRL_OTGBASE_OFFSET )); -writel (v |USBPHYCTRL_EVDO , -MX35_IO_ADDRESS (MX35_USB_BASE_ADDR + -USBPHYCTRL_OTGBASE_OFFSET )); + v =readl (otgbase); +writel (v |USBPHYCTRL_EVDO , otgbase); } }
Signature · 1 line
1.7.6.4
PATCH 2/19 eukrea_cpuimx25: enable workaround ENGcm09152
this fix usb device controler behaviour in gadget mode
--- arch/arm/mach-imx/mach-eukrea_cpuimx25.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-imx/mach-eukrea_cpuimx25.c +1 -0
@@ -106,6 +106,7 @@ static const struct mxc_usbh_platform_data usbh2_pdata __initconst = {static const struct fsl_usb2_platform_data otg_device_pdata__initconst = { .operating_mode =FSL_USB2_DR_DEVICE , .phy_mode =FSL_USB2_PHY_UTMI , + .workaround =FLS_USB2_WORKAROUND_ENGCM09152 , };static int otg_mode_host;
Signature · 1 line
1.7.6.4
PATCH 3/19 cpuimx25sd: fix Kconfig
In reply to Eric Bénardin 0d6cfa3a75f5cde5b3ca0dde748fd22625b4f34c I fixed the mach-types records. We also need to make the name consistent in Kconfig else the machine_is_eukrea_cpuimx25sd macro fails, and thus audio codec is not properly initalized.
--- arch/arm/mach-imx/Kconfig | 4 ++-- arch/arm/mach-imx/Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-imx/Kconfig +2 -2
@@ -132,7 +132,7 @@ config MACH_MX25_3DS select IMX_HAVE_PLATFORM_MXC_NAND select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX -config MACH_EUKREA_CPUIMX25 +config MACH_EUKREA_CPUIMX25SD bool "Support Eukrea CPUIMX25 Platform" select SOC_IMX25 select IMX_HAVE_PLATFORM_FLEXCAN
@@ -148,7 +148,7 @@ config MACH_EUKREA_CPUIMX25 choice prompt "Baseboard" - depends on MACH_EUKREA_CPUIMX25 + depends on MACH_EUKREA_CPUIMX25SD default MACH_EUKREA_MBIMXSD25_BASEBOARD config MACH_EUKREA_MBIMXSD25_BASEBOARD
arch/arm/mach-imx/Makefile +1 -1
@@ -24,7 +24,7 @@ obj-$(CONFIG_MACH_MX21ADS) += mach-mx21ads.o # i.MX25 based machines obj-$(CONFIG_MACH_MX25_3DS) += mach-mx25_3ds.o -obj-$(CONFIG_MACH_EUKREA_CPUIMX25) += mach-eukrea_cpuimx25.o +obj-$(CONFIG_MACH_EUKREA_CPUIMX25SD) += mach-eukrea_cpuimx25.o obj-$(CONFIG_MACH_EUKREA_MBIMXSD25_BASEBOARD) += eukrea_mbimxsd25-baseboard.o # i.MX27 based machines
Signature · 1 line
1.7.6.4
Re: [PATCH 03/19] cpuimx25sd: fix Kconfig
Quoted 7 lines · Eric B?nard
in
0d6cfa3a75f5cde5b3ca0dde748fd22625b4f34cI fixed the mach-types records. We also need to make the name consistent inKconfigelse themachine_is_eukrea_cpuimx25sdmacro fails, and thus audio codec is not properly initalized.Signed-off-by Eric B?nard <[email protected]>Cc Sascha Hauer <[email protected]>
Nit: The subject line is a bit sparse.
Signature · 9 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20111213/6a71e43b/attachment.sig>
PATCH 4/19 mbimxsd25: add spi controler and spidev support
In reply to Eric Bénard--- arch/arm/mach-imx/Kconfig | 1 + arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c | 39 ++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 0 deletions(-)
arch/arm/mach-imx/Kconfig +1 -0
@@ -155,6 +155,7 @@ config MACH_EUKREA_MBIMXSD25_BASEBOARD bool "Eukrea MBIMXSD development board" select IMX_HAVE_PLATFORM_GPIO_KEYS select IMX_HAVE_PLATFORM_IMX_SSI + select IMX_HAVE_PLATFORM_SPI_IMX select LEDS_GPIO_REGISTER help This adds board specific devices that can be found on Eukrea's
arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c +39 -0
@@ -23,6 +23,7 @@#include <linux/leds.h> #include <linux/platform_device.h> #include <linux/input.h> +#include <linux/spi/spi.h> #include <video/platform_lcd.h> #include <mach/hardware.h>
@@ -88,12 +89,22 @@ static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = {/* CAN */ MX25_PAD_GPIO_D__CAN2_RX ,MX25_PAD_GPIO_C__CAN2_TX , +/* SPI1 */ +MX25_PAD_CSPI1_MOSI__CSPI1_MOSI , +MX25_PAD_CSPI1_MISO__CSPI1_MISO , +MX25_PAD_CSPI1_SS0__GPIO_1_16 , +MX25_PAD_CSPI1_SS1__GPIO_1_17 , +MX25_PAD_CSPI1_SCLK__CSPI1_SCLK , + MX25_PAD_CSPI1_RDY__GPIO_2_22, };#define GPIO_LED1 83#define GPIO_SWITCH1 82#define GPIO_SD1CD 52#define GPIO_LCDPWR 26 +#define GPIO_SPI1_SS0 IMX_GPIO_NR(1, 16) +#define GPIO_SPI1_SS1 IMX_GPIO_NR(1, 17) +#define GPIO_SPI1_IRQ IMX_GPIO_NR(2, 22)static struct imx_fb_videomode eukrea_mximxsd_modes[] = { {
@@ -229,6 +240,30 @@ static struct esdhc_platform_data sd1_pdata = { .wp_type = ESDHC_WP_NONE, }; +static struct spi_board_info eukrea_mbimxsd25_spi_board_info[]__initdata = { + { + .modalias ="spidev" , + .max_speed_hz =20000000 , + .bus_num =0 , + .chip_select =0 , + .mode =SPI_MODE_0 , + }, + { + .modalias ="spidev" , + .max_speed_hz =20000000 , + .bus_num =0 , + .chip_select =1 , + .mode =SPI_MODE_0 , + }, +}; + +static int eukrea_mbimxsd25_spi_cs[] = {GPIO_SPI1_SS0 ,GPIO_SPI1_SS1 }; + +static const struct spi_imx_master eukrea_mbimxsd25_spi0_data__initconst = { + .chipselect = eukrea_mbimxsd25_spi_cs, + .num_chipselect =ARRAY_SIZE (eukrea_mbimxsd25_spi_cs), +}; +/* * system init for baseboard usage. Will be called by cpuimx25 init. *
@@ -279,6 +314,10 @@ void __init eukrea_mbimxsd25_baseboard_init(void)i2c_register_board_info (0 , eukrea_mbimxsd_i2c_devices,ARRAY_SIZE (eukrea_mbimxsd_i2c_devices)); +imx25_add_spi_imx0 (&eukrea_mbimxsd25_spi0_data); +spi_register_board_info (eukrea_mbimxsd25_spi_board_info, +ARRAY_SIZE (eukrea_mbimxsd25_spi_board_info)); +platform_add_devices (platform_devices,ARRAY_SIZE (platform_devices));gpio_led_register_device (-1 , &eukrea_mbimxsd_led_info);imx_add_gpio_keys (&eukrea_mbimxsd_button_data);
Signature · 1 line
1.7.6.4
Fabio Estevam
reviewerRe: [PATCH 04/19] mbimxsd25: add spi controler and spidev support
Quoted 1 line · Eric B?nard
+#define ? ? ? ?GPIO_SPI1_IRQ ?
IMX_GPIO_NR(2, 22)
I don't see where this is used.
Regards,
Fabio Estevam
PATCH 5/19 cpuimx25: add watchdog support
In reply to Eric Bénard--- arch/arm/mach-imx/Kconfig | 1 + arch/arm/mach-imx/mach-eukrea_cpuimx25.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-imx/Kconfig +1 -0
@@ -137,6 +137,7 @@ config MACH_EUKREA_CPUIMX25SD select SOC_IMX25 select IMX_HAVE_PLATFORM_FLEXCAN select IMX_HAVE_PLATFORM_FSL_USB2_UDC + select IMX_HAVE_PLATFORM_IMX2_WDT select IMX_HAVE_PLATFORM_IMXDI_RTC select IMX_HAVE_PLATFORM_IMX_FB select IMX_HAVE_PLATFORM_IMX_I2C
arch/arm/mach-imx/mach-eukrea_cpuimx25.c +1 -0
@@ -136,6 +136,7 @@ static void __init eukrea_cpuimx25_init(void)imx25_add_mxc_nand (&eukrea_cpuimx25_nand_board_info);imx25_add_imxdi_rtc (NULL );imx25_add_fec (&mx25_fec_pdata); +imx25_add_imx2_wdt (NULL );i2c_register_board_info (0 , eukrea_cpuimx25_i2c_devices,ARRAY_SIZE (eukrea_cpuimx25_i2c_devices));
Signature · 1 line
1.7.6.4
PATCH 6/19 mx27vis-aic32x4: only register when running on the right machine
In reply to Eric Bénardwithout this fix, a kernel compiled with imx_v4_v5_defconfig and running on a cpuimx25sd leads to :
asoc: tlv320aic23-hifi <-> imx-ssi.0 mapping ok
------------[ cut here ]------------ WARNING: at fs/sysfs/dir.c:481 sysfs_add_one+0x90/0xb8() sysfs: cannot create duplicate filename '/devices/platform/soc-audio' Modules linked in: [<c00198e8>] (unwind_backtrace+0x0/0xf0) from [<c002ea5c>] (warn_slowpath_common+0x48/0x60) [<c002ea5c>] (warn_slowpath_common+0x48/0x60) from [<c002eb08>] (warn_slowpath_fmt+0x30/0x40) [<c002eb08>] (warn_slowpath_fmt+0x30/0x40) from [<c0120090>] (sysfs_add_one+0x90/0xb8) [<c0120090>] (sysfs_add_one+0x90/0xb8) from [<c0120118>] (create_dir+0x60/0xc0) [<c0120118>] (create_dir+0x60/0xc0) from [<c0120228>] (sysfs_create_dir+0x84/0xcc) [<c0120228>] (sysfs_create_dir+0x84/0xcc) from [<c019b9e0>] (kobject_add_internal+0xac/0x1d0) [<c019b9e0>] (kobject_add_internal+0xac/0x1d0) from [<c019bdd8>] (kobject_add+0x50/0x98) [<c019bdd8>] (kobject_add+0x50/0x98) from [<c01f6aec>] (device_add+0xb0/0x610) [<c01f6aec>] (device_add+0xb0/0x610) from [<c01fac8c>] (platform_device_add+0xfc/0x238) [<c01fac8c>] (platform_device_add+0xfc/0x238) from [<c046d884>] (mx27vis_aic32x4_init+0x38/0x84) [<c046d884>] (mx27vis_aic32x4_init+0x38/0x84) from [<c00088a0>] (do_one_initcall+0x34/0x178) [<c00088a0>] (do_one_initcall+0x34/0x178) from [<c045978c>] (kernel_init+0x78/0x114) [<c045978c>] (kernel_init+0x78/0x114) from [<c0014df4>] (kernel_thread_exit+0x0/0x8) ---[ end trace b6a96897e189aea3 ]---
kobject_add_internal failed for soc-audio with -EEXIST, don't try to register things with the same name in the same directory. [<c00198e8>] (unwind_backtrace+0x0/0xf0) from [<c019baec>] (kobject_add_internal+0x1b8/0x1d0) [<c019baec>] (kobject_add_internal+0x1b8/0x1d0) from [<c019bdd8>] (kobject_add+0x50/0x98)
[<c019bdd8>] (kobject_add+0x50/0x98) from [<c01f6aec>] (device_add+0xb0/0x610)
[<c01f6aec>] (device_add+0xb0/0x610) from [<c01fac8c>] (platform_device_add+0xfc/0x238)
[<c01fac8c>] (platform_device_add+0xfc/0x238) from [<c046d884>] (mx27vis_aic32x4_init+0x38/0x84) [<c046d884>] (mx27vis_aic32x4_init+0x38/0x84) from [<c00088a0>] (do_one_initcall+0x34/0x178)
[<c00088a0>] (do_one_initcall+0x34/0x178) from [<c045978c>] (kernel_init+0x78/0x114)
[<c045978c>] (kernel_init+0x78/0x114) from [<c0014df4>] (kernel_thread_exit+0x0/0x8)
ASoC: Platform device allocation failedmxc_audmux_v1_configure_port: not configuredmxc_audmux_v1_configure_port: not configured
--- sound/soc/imx/mx27vis-aic32x4.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
sound/soc/imx/mx27vis-aic32x4.c +4 -0
@@ -96,6 +96,10 @@ static int __init mx27vis_aic32x4_init(void) {int ret; +if (!machine_is_imx27_visstrim_m10 ()) +/* return happy. We might run on a totally different machine */ +return 0 ; + mx27vis_aic32x4_snd_device =platform_device_alloc ("soc-audio" ,-1 );if (!mx27vis_aic32x4_snd_device)return -ENOMEM ;
Signature · 1 line
1.7.6.4
Re: [PATCH 06/19] mx27vis-aic32x4: only register when running on the right machine
Quoted 2 lines · Eric Bénard
without this fix, a kernel compiled with
imx_v4_v5_defconfigand running on a cpuimx25sd leads to :
I'll apply this but a better fix is to convert the driver to be a normal platform driver and only register the device on the appropraite boards.
PATCH 7/19 imx_v4_v5_defconfig: update default configuration
In reply to Eric Bénard- add new machine APF9328
- update CPUIMX25 -> CPUIMX25SD
- add drivers :
- MXC nand driver
- DM9000
- SMSC Phy
- SPIdev
- Led GPIO
--- arch/arm/configs/imx_v4_v5_defconfig | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-)
arch/arm/configs/imx_v4_v5_defconfig +7 -5
@@ -18,9 +18,10 @@ CONFIG_ARCH_MXC=y CONFIG_ARCH_IMX_V4_V5=y CONFIG_ARCH_MX1ADS=y CONFIG_MACH_SCB9328=y +CONFIG_MACH_APF9328=y CONFIG_MACH_MX21ADS=y CONFIG_MACH_MX25_3DS=y -CONFIG_MACH_EUKREA_CPUIMX25=y +CONFIG_MACH_EUKREA_CPUIMX25SD=y CONFIG_MACH_MX27ADS=y CONFIG_MACH_PCM038=y CONFIG_MACH_CPUIMX27=y
@@ -72,17 +73,16 @@ CONFIG_MTD_CFI_GEOMETRY=y CONFIG_MTD_CFI_INTELEXT=y CONFIG_MTD_PHYSMAP=y CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_MXC=y CONFIG_MTD_UBI=y CONFIG_MISC_DEVICES=y CONFIG_EEPROM_AT24=y CONFIG_EEPROM_AT25=y CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_SMC91X=y CONFIG_DM9000=y +CONFIG_SMC91X=y CONFIG_SMC911X=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set +CONFIG_SMSC_PHY=y # CONFIG_INPUT_MOUSEDEV is not set CONFIG_INPUT_EVDEV=y # CONFIG_INPUT_KEYBOARD is not set
@@ -100,6 +100,7 @@ CONFIG_I2C_CHARDEV=y CONFIG_I2C_IMX=y CONFIG_SPI=y CONFIG_SPI_IMX=y +CONFIG_SPI_SPIDEV=y CONFIG_W1=y CONFIG_W1_MASTER_MXC=y CONFIG_W1_SLAVE_THERM=y
@@ -139,6 +140,7 @@ CONFIG_MMC=y CONFIG_MMC_MXC=y CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y CONFIG_LEDS_MC13783=y CONFIG_LEDS_TRIGGERS=y CONFIG_LEDS_TRIGGER_TIMER=y
Signature · 1 line
1.7.6.4
PATCH 8/19 dma: MX3_IPU fix depends
In reply to Eric BénardARCH_MX3 was removed in e760b5260d39113794da17c64cbd6e6311155b66 thus preventing to select MX3_IPU, thus preventing IPU and display to work on i.MX3x SOC.
--- drivers/dma/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/dma/Kconfig +1 -1
@@ -124,7 +124,7 @@ config MV_XOR config MX3_IPU bool "MX3x Image Processing Unit support" - depends on ARCH_MX3 + depends on SOC_IMX31 ||?SOC_IMX35 select DMA_ENGINE default y help
Signature · 1 line
1.7.6.4
Re: [PATCH 08/19] dma: MX3_IPU fix depends
Hello.
Quoted 1 line · Eric B?nard
ARCH_MX3was removed ine760b5260d39113794da17c64cbd6e6311155b66
Please also specify that commit's summary in parens.
Quoted 7 lines
thus preventing to select
MX3_IPU, thus preventing IPU and display to work on i.MX3x SOC.Signed-off-by Eric B?nard<[email protected]>Cc Sascha Hauer<[email protected]>Cc Vinod Koul<[email protected]>Cc Dan Williams<[email protected]>
WBR, Sergei
Re: [PATCH 08/19] dma: MX3_IPU fix depends
Le 13/12/2011 11:53, Sergei Shtylyov a ?crit :
Quoted 6 lines · Eric B?nard
Quoted 2 lines
ARCH_MX3was removed ine760b5260d39113794da17c64cbd6e6311155b66Please also specify that commit's summary in parens.
good point, especially I pointed to the wrong commit. v2 follows including change addressing Fabio's comments
Eric
Fabio Estevam
reviewerRe: [PATCH 08/19] dma: MX3_IPU fix depends
In reply to Eric BénardQuoted 18 lines · Eric B?nard
ARCH_MX3was removed ine760b5260d39113794da17c64cbd6e6311155b66thus preventing to selectMX3_IPU, thus preventing IPU and display to work on i.MX3x SOC.Signed-off-by Eric B?nard <[email protected]>Cc Sascha Hauer <[email protected]>Cc Vinod Koul <[email protected]>Cc Dan Williams <[email protected]>---
?drivers/dma/Kconfig | ? ?2 +-
?1 files changed, 1 insertions(+), 1 deletions(-)drivers/dma/Kconfig +0
-0@@ -124,7 +124,7 @@ config MV_XOR
Quoted 7 lines
?config
MX3_IPU
? ? ? ?bool "MX3x Image Processing Unit support"
- ? ? ? depends onARCH_MX3
+ ? ? ? depends onSOC_IMX31||?SOC_IMX35
? ? ? ?selectDMA_ENGINE
? ? ? ?default y
? ? ? ?help
On this same file there is another reference to ARCH_MX3 in the "config IMX_SDMA"
dependency.
Care to send a patch fixing both locations?
Regards,
Fabio Estevam
PATCH v2 8/19 dma: MX3_IPU fix depends
ARCH_MX3 was removed in commit a89cf59 :
"arm/imx: merge i.MX3 and i.MX6"
thus preventing to select MX3_IPU, thus preventing IPU and display to work on i.MX3x SOC.
i.MX SDMA support is also affected.
---
v2: improve comment based on Sergei's comments, and also handle SDMA case based on Fabio's comment
drivers/dma/Kconfig | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/dma/Kconfig +2 -2
@@ -124,7 +124,7 @@ config MV_XOR config MX3_IPU bool "MX3x Image Processing Unit support" - depends on ARCH_MX3 + depends on SOC_IMX31 ||?SOC_IMX35 select DMA_ENGINE default y help
@@ -216,7 +216,7 @@ config PCH_DMA config IMX_SDMA tristate "i.MX SDMA support" - depends on ARCH_MX25 || ARCH_MX3 || ARCH_MX5 + depends on ARCH_MX25 || SOC_IMX31 ||?SOC_IMX35 || ARCH_MX5 select DMA_ENGINE help Support the i.MX SDMA engine. This engine is integrated into
Signature · 1 line
1.7.6.4
Re: [PATCH v2 08/19] dma: MX3_IPU fix depends
Quoted 30 lines · Eric B?nard
ARCH_MX3was removed in commit a89cf59 :
"arm/imx: merge i.MX3 and i.MX6"
thus preventing to selectMX3_IPU, thus preventing IPU and display to work on i.MX3x SOC.
i.MX SDMA support is also affected.Signed-off-by Eric B?nard <[email protected]>Cc Sascha Hauer <[email protected]>Cc Vinod Koul <[email protected]>Cc Dan Williams <[email protected]>---
v2: improve comment based on Sergei's comments, and also handle SDMA case based on Fabio's commentdrivers/dma/Kconfig | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)drivers/dma/Kconfig +1
-1@@ -124,7 +124,7 @@ config MV_XOR config MX3_IPU bool "MX3x Image Processing Unit support" - depends on ARCH_MX3 + depends on SOC_IMX31 || SOC_IMX35 select DMA_ENGINE default y help
drivers/dma/Kconfig config PCH_DMA · line 222
Quoted 8 lines
drivers/dma/Kconfig +1
-1@@ -216,7 +216,7 @@ config PCH_DMA config IMX_SDMA tristate "i.MX SDMA support" - depends on ARCH_MX25 || ARCH_MX3 || ARCH_MX5 + depends on ARCH_MX25 || SOC_IMX31 || SOC_IMX35 || ARCH_MX5 select DMA_ENGINE help Support the i.MX SDMA engine. This engine is integrated into
Which tree is this targeted to?
Signature · 1 line
~Vinod
Re: [PATCH v2 08/19] dma: MX3_IPU fix depends
Le 23/12/2011 16:45, Vinod Koul a ?crit :
Quoted 32 lines · Eric B?nard
Quoted 31 lines
ARCH_MX3was removed in commit a89cf59 :
"arm/imx: merge i.MX3 and i.MX6"
thus preventing to selectMX3_IPU, thus preventing IPU and display to work on i.MX3x SOC.
i.MX SDMA support is also affected.Signed-off-by Eric B?nard<[email protected]>Cc Sascha Hauer<[email protected]>Cc Vinod Koul<[email protected]>Cc Dan Williams<[email protected]>---
v2: improve comment based on Sergei's comments, and also handle SDMA case based on Fabio's commentdrivers/dma/Kconfig | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)drivers/dma/Kconfig +1
-1@@ -124,7 +124,7 @@ config MV_XOR config MX3_IPU bool "MX3x Image Processing Unit support" - depends on ARCH_MX3 + depends on SOC_IMX31 || SOC_IMX35 select DMA_ENGINE default y help@@ -216,7 +216,7 @@ config PCH_DMA
Quoted 9 lines
drivers/dma/Kconfig config PCH_DMA · line 222
Quoted 7 lines
drivers/dma/Kconfig +1
-1config IMX_SDMA tristate "i.MX SDMA support" - depends on ARCH_MX25 || ARCH_MX3 || ARCH_MX5 + depends on ARCH_MX25 || SOC_IMX31 || SOC_IMX35 || ARCH_MX5 select DMA_ENGINE help Support the i.MX SDMA engine. This engine is integrated intoWhich tree is this targeted to?
if I followed everything (see Stephen Rothwell mail titled "linux-next: manual merge of the slave-dma tree with the arm-soc tree"), this patch was not applieed because the problem was already fixed in commit 8e2d41f8c856 ("dma i.MX: remove individual SOC dependency") from the slave-dma tree
Eric
Re: [PATCH v2 08/19] dma: MX3_IPU fix depends
Quoted 8 lines · Eric B?nard
if I followed everything (see Stephen Rothwell mail titled "linux-next: manual
merge of the slave-dma tree with the arm-soc tree"), this patch was not
applieed because the problem was already fixed in commit8e2d41f8c856("dma
i.MX: remove individual SOC dependency") from the slave-dma tree
Okay thanks,
I will check the merge conflict
Signature · 1 line
~Vinod
PATCH 9/19 clock-imx35: fix reboot in internal boot mode
In reply to Eric Bénardcommit 8d75a2620dc3e33ce504044c375c443ed7ed4128 disable IIM clock after reading silicon revision which will prevent reboot in internal boot mode (see comment a few line before)
--- arch/arm/mach-imx/clock-imx35.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
arch/arm/mach-imx/clock-imx35.c +4 -1
@@ -538,7 +538,10 @@ int __init mx35_clocks_init()clk_enable (&iim_clk);imx_print_silicon_rev ("i.MX35" ,mx35_revision ()); -clk_disable (&iim_clk); +/* Don't disable IIM clock if we came up in internal boot mode */ +if (__raw_readl (CCM_BASE +CCM_RCSR ) & (3 <<10 )) { +clk_disable (&iim_clk); + }#ifdef CONFIG_MXC_USE_EPIT epit_timer_init(&epit1_clk,
Signature · 1 line
1.7.6.4
Sascha Hauer
maintainerRe: [PATCH 09/19] clock-imx35: fix reboot in internal boot modeg
Quoted 3 lines · Eric B?nard
commit
8d75a2620dc3e33ce504044c375c443ed7ed4128disable IIM clock after reading silicon revision which will prevent reboot in internal boot mode (see comment a few line before)
I'm a bit unsure. The fix you suggest is the least intrusive, but a proper fix would be to move the mentioned block below the imx_print_silicon_rev, like this:
clk_enable(&iim_clk);
imx_print_silicon_rev("i.MX35", mx35_revision());
clk_disable(&iim_clk);
/*
* Check if we came up in internal boot mode. If yes, we need
* some
* extra clocks turned on, otherwise the MX35 boot ROM code will
* hang after a watchdog reset.
*/
if (!(__raw_readl(CCM_BASE + CCM_RCSR) & (3 << 10))) {
clk_enable(&iim_clk);
clk_enable(&uart1_clk);
clk_enable(&scc_clk);
}This would also get the clk enable counters right.
Sascha
Quoted 28 lines
Signed-off-by Eric B?nard <[email protected]>Cc Jason Liu <[email protected]>Cc Sascha Hauer <[email protected]>--- arch/arm/mach-imx/clock-imx35.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)arch/arm/mach-imx/clock-imx35.c +4
-1@@ -538,7 +538,10 @@ int __init mx35_clocks_init()clk_enable (&iim_clk);imx_print_silicon_rev ("i.MX35" ,mx35_revision ()); -clk_disable (&iim_clk); +/* Don't disable IIM clock if we came up in internal boot mode */ +if (__raw_readl (CCM_BASE +CCM_RCSR ) & (3 <<10 )) { +clk_disable (&iim_clk); + }#ifdef CONFIG_MXC_USE_EPIT epit_timer_init(&epit1_clk,Signature · 1 line
1.7.6.4
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Re: [PATCH 09/19] clock-imx35: fix reboot in internal boot modeg
Le 13/12/2011 11:00, Sascha Hauer a ?crit :
Quoted 25 lines · Eric B?nard
Quoted 3 lines
commit
8d75a2620dc3e33ce504044c375c443ed7ed4128disable IIM clock after reading silicon revision which will prevent reboot in internal boot mode (see comment a few line before)I'm a bit unsure. The fix you suggest is the least intrusive, but a proper fix would be to move the mentioned block below the
imx_print_silicon_rev, like this:clk_enable(&iim_clk); imx_print_silicon_rev("i.MX35", mx35_revision()); clk_disable(&iim_clk); /* * Check if we came up in internal boot mode. If yes, we need * some * extra clocks turned on, otherwise the MX35 boot ROM code will * hang after a watchdog reset. */ if (!(__raw_readl(CCM_BASE + CCM_RCSR)& (3<< 10))) { clk_enable(&iim_clk); clk_enable(&uart1_clk); clk_enable(&scc_clk); }
Quoted 2 lines
This would also get the clk enable counters right.
OK that's cleaner.
While fixing the patch it seems comment & code are not synced as scc_clk is 0x3 << 2 and the code was setting 0x3 << 4 which corresponds to sdma_clk (and in my configuration, reboot works without any of these clocks forced). I chose to have code synced with comment for v2 of the patch.
Eric
PATCH v2 9/19 clock-imx35: fix reboot in internal boot mode
In reply to Sascha Hauercommit 8d75a26 "ARM: mx35: use generic function for displaying silicon revision" disabled IIM clock after reading silicon revision which will prevent reboot in internal boot mode.
---
v2: improve comment and code based on Sascha & Sergei's comments
arch/arm/mach-imx/clock-imx35.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)
arch/arm/mach-imx/clock-imx35.c +10 -10
@@ -507,7 +507,7 @@ static struct clk_lookup lookups[] = {int __init mx35_clocks_init () { -unsigned int cgr2 =3 <<26 , cgr3 =0 ; +unsigned int cgr2 =3 <<26 ;#if defined(CONFIG_DEBUG_LL ) && !defined(CONFIG_DEBUG_ICEDCC ) cgr2 |=3 <<16 ;
@@ -521,6 +521,12 @@ int __init mx35_clocks_init()__raw_writel ((3 <<18 ),CCM_BASE +CCM_CGR0 );__raw_writel ((3 <<2 ) | (3 <<4 ) | (3 <<6 ) | (3 <<8 ) | (3 <<16 ),CCM_BASE +CCM_CGR1 ); +__raw_writel (cgr2,CCM_BASE +CCM_CGR2 ); +__raw_writel (0 ,CCM_BASE +CCM_CGR3 ); + +clk_enable (&iim_clk); +imx_print_silicon_rev ("i.MX35" ,mx35_revision ()); +clk_disable (&iim_clk);/* * Check if we came up in internal boot mode. If yes, we need some
@@ -529,17 +535,11 @@ int __init mx35_clocks_init()*/ if (!(__raw_readl (CCM_BASE +CCM_RCSR ) & (3 <<10 ))) {/* Additionally turn on UART1, SCC, and IIM clocks */ - cgr2 |=3 <<16 |3 <<4 ; - cgr3 |=3 <<2 ; +clk_enable (&iim_clk); +clk_enable (&uart1_clk); +clk_enable (&scc_clk); } -__raw_writel (cgr2,CCM_BASE +CCM_CGR2 ); -__raw_writel (cgr3,CCM_BASE +CCM_CGR3 ); - -clk_enable (&iim_clk); -imx_print_silicon_rev ("i.MX35" ,mx35_revision ()); -clk_disable (&iim_clk); -#ifdef CONFIG_MXC_USE_EPIT epit_timer_init (&epit1_clk,MX35_IO_ADDRESS (MX35_EPIT1_BASE_ADDR ),MX35_INT_EPIT1 );
Signature · 1 line
1.7.6.4
Re: [PATCH 09/19] clock-imx35: fix reboot in internal boot mode
In reply to Eric BénardHello.
Quoted 1 line · Eric B?nard
commit
8d75a2620dc3e33ce504044c375c443ed7ed4128
Please also specify that commit's summary in parens.
Quoted 1 line
disable IIM
Disables?
Quoted 15 lines
clock after reading silicon revision which will prevent reboot in internal boot mode (see comment a few line before)
Signed-off-by Eric B?nard<[email protected]>Cc Jason Liu<[email protected]>Cc Sascha Hauer<[email protected]>--- arch/arm/mach-imx/clock-imx35.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)arch/arm/mach-imx/clock-imx35.c +0
-0
arch/arm/mach-imx/clock-imx35.c int __init mx35_clocks_init() · line 544
Quoted 8 lines
arch/arm/mach-imx/clock-imx35.c +4
-1@@ -538,7 +538,10 @@ int __init mx35_clocks_init()clk_enable (&iim_clk);imx_print_silicon_rev ("i.MX35" ,mx35_revision ()); -clk_disable (&iim_clk); +/* Don't disable IIM clock if we came up in internal boot mode */ +if (__raw_readl (CCM_BASE +CCM_RCSR ) & (3 <<10 )) { +clk_disable (&iim_clk); + }
{} not needed -- scripts/checkpatch.pl should have warned you.
WBR, Sergei
Re: [PATCH 09/19] clock-imx35: fix reboot in internal boot mode
Hi,
Le 13/12/2011 11:52, Sergei Shtylyov a ?crit :
Quoted 2 lines
{} not needed --
scripts/checkpatch.plshould have warned you.
it failed to do so :
$ ./scripts/checkpatch.pl 0009-clock-imx35-fix-reboot-in-internal-boot-mode.patch total: 0 errors, 0 warnings, 11 lines checked
0009-clock-imx35-fix-reboot-in-internal-boot-mode.patch has no obvious style problems and is ready for submission.
Eric
PATCH 10/19 wm1133-ev1: only register when running on the right machine
In reply to Eric Bénardwithout this fix, a kernel compiled with mx3_defconfig and running on a cpuimx35sd leads to :
asoc: tlv320aic23-hifi <-> imx-ssi.0 mapping ok
------------[ cut here ]------------ WARNING: at fs/sysfs/dir.c:481 sysfs_add_one+0x88/0xb0() sysfs: cannot create duplicate filename '/devices/platform/soc-audio' Modules linked in: [<c0014384>] (unwind_backtrace+0x0/0xf0) from [<c0026260>] (warn_slowpath_common+0x4c/0x64) [<c0026260>] (warn_slowpath_common+0x4c/0x64) from [<c002630c>] (warn_slowpath_fmt+0x30/0x40) [<c002630c>] (warn_slowpath_fmt+0x30/0x40) from [<c00ebc80>] (sysfs_add_one+0x88/0xb0) [<c00ebc80>] (sysfs_add_one+0x88/0xb0) from [<c00ebd08>] (create_dir+0x60/0xb8) [<c00ebd08>] (create_dir+0x60/0xb8) from [<c00ebe0c>] (sysfs_create_dir+0x80/0xc8) [<c00ebe0c>] (sysfs_create_dir+0x80/0xc8) from [<c0180d44>] (kobject_add_internal+0xac/0x1d0) [<c0180d44>] (kobject_add_internal+0xac/0x1d0) from [<c018113c>] (kobject_add+0x50/0x98) [<c018113c>] (kobject_add+0x50/0x98) from [<c01c4800>] (device_add+0xb0/0x5fc) [<c01c4800>] (device_add+0xb0/0x5fc) from [<c01c8860>] (platform_device_add+0xfc/0x238) [<c01c8860>] (platform_device_add+0xfc/0x238) from [<c0464d60>] (wm1133_ev1_audio_init+0x58/0x80) [<c0464d60>] (wm1133_ev1_audio_init+0x58/0x80) from [<c0008670>] (do_one_initcall+0x34/0x17c) [<c0008670>] (do_one_initcall+0x34/0x17c) from [<c045177c>] (kernel_init+0x78/0x11c) [<c045177c>] (kernel_init+0x78/0x11c) from [<c000f514>] (kernel_thread_exit+0x0/0x8) ---[ end trace 4453d8d40de9f5ff ]---
kobject_add_internal failed for soc-audio with -EEXIST, don't try to register things with the same name in the same directory. [<c0014384>] (unwind_backtrace+0x0/0xf0) from [<c0180e50>] (kobject_add_internal+0x1b8/0x1d0) [<c0180e50>] (kobject_add_internal+0x1b8/0x1d0) from [<c018113c>] (kobject_add+0x50/0x98)
[<c018113c>] (kobject_add+0x50/0x98) from [<c01c4800>] (device_add+0xb0/0x5fc)
[<c01c4800>] (device_add+0xb0/0x5fc) from [<c01c8860>] (platform_device_add+0xfc/0x238)
[<c01c8860>] (platform_device_add+0xfc/0x238) from [<c0464d60>] (wm1133_ev1_audio_init+0x58/0x80) [<c0464d60>] (wm1133_ev1_audio_init+0x58/0x80) from [<c0008670>] (do_one_initcall+0x34/0x17c) [<c0008670>] (do_one_initcall+0x34/0x17c) from [<c045177c>] (kernel_init+0x78/0x11c)
[<c045177c>] (kernel_init+0x78/0x11c) from [<c000f514>] (kernel_thread_exit+0x0/0x8)
--- sound/soc/imx/wm1133-ev1.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
sound/soc/imx/wm1133-ev1.c +5 -0
@@ -20,6 +20,7 @@#include <sound/pcm.h> #include <sound/pcm_params.h> #include <sound/soc.h> +#include <asm/mach-types.h> #include <mach/audmux.h>
@@ -266,6 +267,10 @@ static int __init wm1133_ev1_audio_init(void)int ret;unsigned int ptcr, pdcr; +if (!machine_is_mx31ads ()) +/* return happy. We might run on a totally different machine */ +return 0 ; +/* SSI0 mastered by port 5 */ ptcr =MXC_AUDMUX_V2_PTCR_SYN | MXC_AUDMUX_V2_PTCR_TFSDIR |
Signature · 1 line
1.7.6.4
PATCH 11/19 cpuimx35sd: fix Kconfig
In reply to Eric Bénardin 0d6cfa3a75f5cde5b3ca0dde748fd22625b4f34c I fixed the mach-types records. We also need to make the name consistent in Kconfig else the machine_is_eukrea_cpuimx35sd macro fails, and thus audio codec is not properly initalized.
--- arch/arm/mach-imx/Kconfig | 4 ++-- arch/arm/mach-imx/Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-imx/Kconfig +2 -2
@@ -544,7 +544,7 @@ config MACH_MX35_3DS Include support for MX35PDK platform. This includes specific configurations for the board and its peripherals. -config MACH_EUKREA_CPUIMX35 +config MACH_EUKREA_CPUIMX35SD bool "Support Eukrea CPUIMX35 Platform" select SOC_IMX35 select IMX_HAVE_PLATFORM_FLEXCAN
@@ -562,7 +562,7 @@ config MACH_EUKREA_CPUIMX35 choice prompt "Baseboard" - depends on MACH_EUKREA_CPUIMX35 + depends on MACH_EUKREA_CPUIMX35SD default MACH_EUKREA_MBIMXSD35_BASEBOARD config MACH_EUKREA_MBIMXSD35_BASEBOARD
arch/arm/mach-imx/Makefile +1 -1
@@ -57,7 +57,7 @@ obj-$(CONFIG_MACH_BUG) += mach-bug.o # i.MX35 based machines obj-$(CONFIG_MACH_PCM043) += mach-pcm043.o obj-$(CONFIG_MACH_MX35_3DS) += mach-mx35_3ds.o -obj-$(CONFIG_MACH_EUKREA_CPUIMX35) += mach-cpuimx35.o +obj-$(CONFIG_MACH_EUKREA_CPUIMX35SD) += mach-cpuimx35.o obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o
Signature · 1 line
1.7.6.4
PATCH 12/19 cpuimx35: fix touchscreen support
In reply to Eric Bénard--- arch/arm/mach-imx/mach-cpuimx35.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
arch/arm/mach-imx/mach-cpuimx35.c +7 -1
@@ -53,12 +53,18 @@ static const struct imxi2c_platform_data .bitrate = 100000, }; +#define TSC2007_IRQGPIO IMX_GPIO_NR(3, 2) +static int tsc2007_get_pendown_state (void ) +{ +return !gpio_get_value (TSC2007_IRQGPIO ); +} +static struct tsc2007_platform_data tsc2007_info = { .model =2007 , .x_plate_ohms =180 , + .get_pendown_state = tsc2007_get_pendown_state, }; -#define TSC2007_IRQGPIO IMX_GPIO_NR(3, 2)static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = { {I2C_BOARD_INFO ("pcf8563" ,0x51 ),
Signature · 1 line
1.7.6.4
PATCH 13/19 enable uncompress log on cpuimx35sd
In reply to Eric Bénard--- arch/arm/plat-mxc/include/mach/uncompress.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/plat-mxc/include/mach/uncompress.h +1 -0
@@ -98,6 +98,7 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)case MACH_TYPE_PCM043 :case MACH_TYPE_LILLY1131 :case MACH_TYPE_VPR200 : +case MACH_TYPE_EUKREA_CPUIMX35SD : uart_base =MX3X_UART1_BASE_ADDR ;break ;case MACH_TYPE_MAGX_ZN5 :
Signature · 1 line
1.7.6.4
PATCH 14/19 mbimxsd35: add spi controler and spidev support
In reply to Eric Bénard--- arch/arm/mach-imx/Kconfig | 1 + arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c | 39 ++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 0 deletions(-)
arch/arm/mach-imx/Kconfig +1 -0
@@ -570,6 +570,7 @@ config MACH_EUKREA_MBIMXSD35_BASEBOARD select IMX_HAVE_PLATFORM_GPIO_KEYS select IMX_HAVE_PLATFORM_IMX_SSI select IMX_HAVE_PLATFORM_IPU_CORE + select IMX_HAVE_PLATFORM_SPI_IMX select LEDS_GPIO_REGISTER help This adds board specific devices that can be found on Eukrea's
arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c +39 -0
@@ -27,6 +27,7 @@#include <linux/leds.h> #include <linux/platform_device.h> #include <linux/input.h> +#include <linux/spi/spi.h> #include <video/platform_lcd.h> #include <linux/i2c.h>
@@ -159,12 +160,22 @@ static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = {MX35_PAD_SD1_DATA3__ESDHC1_DAT3 ,/* SD1 CD */ MX35_PAD_LD18__GPIO3_24 , +/* SPI */ +MX35_PAD_CSPI1_MOSI__CSPI1_MOSI , +MX35_PAD_CSPI1_MISO__CSPI1_MISO , +MX35_PAD_CSPI1_SS0__GPIO1_18 , +MX35_PAD_CSPI1_SS1__GPIO1_19 , +MX35_PAD_CSPI1_SCLK__CSPI1_SCLK , + MX35_PAD_CSPI1_SPI_RDY__GPIO3_5, };#define GPIO_LED1 IMX_GPIO_NR(3, 29)#define GPIO_SWITCH1 IMX_GPIO_NR(3, 25)#define GPIO_LCDPWR IMX_GPIO_NR(1, 4)#define GPIO_SD1CD IMX_GPIO_NR(3, 24) +#define GPIO_SPI1_SS0 IMX_GPIO_NR(1, 18) +#define GPIO_SPI1_SS1 IMX_GPIO_NR(1, 19) +#define GPIO_SPI1_IRQ IMX_GPIO_NR(3, 5)static void eukrea_mbimxsd_lcd_power_set (struct plat_lcd_data *pd,unsigned int power)
@@ -240,6 +251,30 @@ static struct esdhc_platform_data sd1_pdata = { .wp_type = ESDHC_WP_NONE, }; +static struct spi_board_info eukrea_mbimxsd35_spi_board_info[]__initdata = { + { + .modalias ="spidev" , + .max_speed_hz =20000000 , + .bus_num =0 , + .chip_select =0 , + .mode =SPI_MODE_0 , + }, + { + .modalias ="spidev" , + .max_speed_hz =20000000 , + .bus_num =0 , + .chip_select =1 , + .mode =SPI_MODE_0 , + }, +}; + +static int eukrea_mbimxsd35_spi_cs[] = {GPIO_SPI1_SS0 ,GPIO_SPI1_SS1 }; + +static const struct spi_imx_master eukrea_mbimxsd35_spi0_data__initconst = { + .chipselect = eukrea_mbimxsd35_spi_cs, + .num_chipselect =ARRAY_SIZE (eukrea_mbimxsd35_spi_cs), +}; +/* * system init for baseboard usage. Will be called by cpuimx35 init. *
@@ -291,6 +326,10 @@ void __init eukrea_mbimxsd35_baseboard_init(void)i2c_register_board_info (0 , eukrea_mbimxsd_i2c_devices,ARRAY_SIZE (eukrea_mbimxsd_i2c_devices)); +imx35_add_spi_imx0 (&eukrea_mbimxsd35_spi0_data); +spi_register_board_info (eukrea_mbimxsd35_spi_board_info, +ARRAY_SIZE (eukrea_mbimxsd35_spi_board_info)); +platform_add_devices (platform_devices,ARRAY_SIZE (platform_devices));gpio_led_register_device (-1 , &eukrea_mbimxsd_led_info);imx_add_gpio_keys (&eukrea_mbimxsd_button_data);
Signature · 1 line
1.7.6.4
PATCH 15/19 mx3_defconfig: update default configuration
In reply to Eric Bénard- add new machine VPR200
- update CPUIMX35 -> CPUIMX35SD
- add drivers :
- DNET & SMSC911X
- EVDEV & TOUCHSCREEN & TSC2007
- LCD & BACKLIGHT support
- SPI & SPIdev support
- LEDS support
- PCF8563 RTC support
--- arch/arm/configs/mx3_defconfig | 31 ++++++++++++++++++++++++------- 1 files changed, 24 insertions(+), 7 deletions(-)
arch/arm/configs/mx3_defconfig +24 -7
@@ -23,7 +23,8 @@ CONFIG_MACH_ARMADILLO5X0=y CONFIG_MACH_KZM_ARM11_01=y CONFIG_MACH_PCM043=y CONFIG_MACH_MX35_3DS=y -CONFIG_MACH_EUKREA_CPUIMX35=y +CONFIG_MACH_EUKREA_CPUIMX35SD=y +CONFIG_MACH_VPR200=y CONFIG_MXC_IRQ_PRIOR=y CONFIG_MXC_PWM=y CONFIG_ARM_ERRATA_411920=y
@@ -63,18 +64,17 @@ CONFIG_MTD_UBI=y CONFIG_MISC_DEVICES=y CONFIG_EEPROM_AT24=y CONFIG_NETDEVICES=y -CONFIG_SMSC_PHY=y -CONFIG_NET_ETHERNET=y -CONFIG_SMSC911X=y CONFIG_DNET=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set +CONFIG_SMSC911X=y +CONFIG_SMSC_PHY=y # CONFIG_INPUT_MOUSEDEV is not set +CONFIG_INPUT_EVDEV=y # CONFIG_KEYBOARD_ATKBD is not set CONFIG_KEYBOARD_IMX=y # CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_TSC2007=y # CONFIG_SERIO is not set -# CONFIG_VT is not set # CONFIG_LEGACY_PTYS is not set CONFIG_SERIAL_8250=m CONFIG_SERIAL_8250_EXTENDED=y
@@ -86,6 +86,9 @@ CONFIG_I2C=y CONFIG_I2C_CHARDEV=y CONFIG_I2C_IMX=y CONFIG_SPI=y +CONFIG_SPI_IMX=y +CONFIG_SPI_SPIDEV=y +CONFIG_GPIO_SYSFS=y CONFIG_W1=y CONFIG_W1_MASTER_MXC=y CONFIG_W1_SLAVE_THERM=y
@@ -109,6 +112,10 @@ CONFIG_SOC_CAMERA_OV772X=y CONFIG_VIDEO_MX3=y # CONFIG_RADIO_ADAPTERS is not set CONFIG_FB=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_LCD_CLASS_DEVICE=y +CONFIG_LCD_PLATFORM=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y CONFIG_SOUND=y CONFIG_SND=y # CONFIG_SND_ARM is not set
@@ -127,7 +134,17 @@ CONFIG_USB_G_SERIAL=m CONFIG_USB_ULPI=y CONFIG_MMC=y CONFIG_MMC_MXC=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_PCF8563=y CONFIG_RTC_MXC=y CONFIG_DMADEVICES=y # CONFIG_DNOTIFY is not set
Signature · 1 line
1.7.6.4
PATCH 16/19 eukrea-cpuimx51: remove board
In reply to Eric Bénardthis board is not maintained anymore and is replaced by cpuimx51sd
--- arch/arm/configs/mx5_defconfig | 1 - arch/arm/mach-mx5/Kconfig | 30 --- arch/arm/mach-mx5/Makefile | 2 - arch/arm/mach-mx5/board-cpuimx51.c | 300 -------------------------- arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c | 206 ------------------ 5 files changed, 0 insertions(+), 539 deletions(-) delete mode 100644 arch/arm/mach-mx5/board-cpuimx51.c delete mode 100644 arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
arch/arm/configs/mx5_defconfig +0 -1
@@ -17,7 +17,6 @@ CONFIG_ARCH_MXC=y CONFIG_ARCH_MX5=y CONFIG_MACH_MX51_BABBAGE=y CONFIG_MACH_MX51_3DS=y -CONFIG_MACH_EUKREA_CPUIMX51=y CONFIG_MACH_EUKREA_CPUIMX51SD=y CONFIG_MACH_MX51_EFIKAMX=y CONFIG_MACH_MX51_EFIKASB=y
arch/arm/mach-mx5/Kconfig +0 -30
@@ -93,36 +93,6 @@ config MACH_MX51_3DS Include support for MX51PDK (3DS) platform. This includes specific configurations for the board and its peripherals. -config MACH_EUKREA_CPUIMX51 - bool "Support Eukrea CPUIMX51 module" - select SOC_IMX51 - select IMX_HAVE_PLATFORM_FSL_USB2_UDC - select IMX_HAVE_PLATFORM_IMX_I2C - select IMX_HAVE_PLATFORM_IMX_UART - select IMX_HAVE_PLATFORM_MXC_EHCI - select IMX_HAVE_PLATFORM_MXC_NAND - select IMX_HAVE_PLATFORM_SPI_IMX - help - Include support for Eukrea CPUIMX51 platform. This includes - specific configurations for the module and its peripherals. - -choice - prompt "Baseboard" - depends on MACH_EUKREA_CPUIMX51 - default MACH_EUKREA_MBIMX51_BASEBOARD - -config MACH_EUKREA_MBIMX51_BASEBOARD - prompt "Eukrea MBIMX51 development board" - bool - select IMX_HAVE_PLATFORM_IMX_KEYPAD - select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX - select LEDS_GPIO_REGISTER - help - This adds board specific devices that can be found on Eukrea's - MBIMX51 evaluation board. - -endchoice - config MACH_EUKREA_CPUIMX51SD bool "Support Eukrea CPUIMX51SD module" select SOC_IMX51
arch/arm/mach-mx5/Makefile +0 -2
@@ -13,8 +13,6 @@ obj-$(CONFIG_MACH_MX53_EVK) += board-mx53_evk.o obj-$(CONFIG_MACH_MX53_SMD) += board-mx53_smd.o obj-$(CONFIG_MACH_MX53_LOCO) += board-mx53_loco.o obj-$(CONFIG_MACH_MX53_ARD) += board-mx53_ard.o -obj-$(CONFIG_MACH_EUKREA_CPUIMX51) += board-cpuimx51.o -obj-$(CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD) += eukrea_mbimx51-baseboard.o obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += board-cpuimx51sd.o obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd-baseboard.o obj-$(CONFIG_MX51_EFIKA_COMMON) += mx51_efika.o
arch/arm/mach-mx5/board-cpuimx51.c deleted +0 -300
300 lines not on this page · raw message
arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c deleted +0 -206
206 lines not on this page · raw message
Signature · 1 line
1.7.6.4
Sascha Hauer
maintainerRe: [PATCH 16/19] eukrea-cpuimx51: remove board
Quoted 1 line · Eric B?nard
this board is not maintained anymore and is replaced by cpuimx51sd
I'm happy to remove this code, but aren't there any users of this board?
Sascha
Quoted 601 lines
Signed-off-by Eric B?nard <[email protected]>Cc Sascha Hauer <[email protected]>--- arch/arm/configs/mx5_defconfig | 1 - arch/arm/mach-mx5/Kconfig | 30 --- arch/arm/mach-mx5/Makefile | 2 - arch/arm/mach-mx5/board-cpuimx51.c | 300 -------------------------- arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c | 206 ------------------ 5 files changed, 0 insertions(+), 539 deletions(-) delete mode 100644 arch/arm/mach-mx5/board-cpuimx51.c delete mode 100644 arch/arm/mach-mx5/eukrea_mbimx51-baseboard.carch/arm/configs/mx5_defconfig +0
-1@@ -17,7 +17,6 @@ CONFIG_ARCH_MXC=y CONFIG_ARCH_MX5=y CONFIG_MACH_MX51_BABBAGE=y CONFIG_MACH_MX51_3DS=y -CONFIG_MACH_EUKREA_CPUIMX51=y CONFIG_MACH_EUKREA_CPUIMX51SD=y CONFIG_MACH_MX51_EFIKAMX=y CONFIG_MACH_MX51_EFIKASB=yarch/arm/mach-mx5/Kconfig +0
-30@@ -93,36 +93,6 @@ config MACH_MX51_3DS Include support for MX51PDK (3DS) platform. This includes specific configurations for the board and its peripherals. -config MACH_EUKREA_CPUIMX51 - bool "Support Eukrea CPUIMX51 module" - select SOC_IMX51 - select IMX_HAVE_PLATFORM_FSL_USB2_UDC - select IMX_HAVE_PLATFORM_IMX_I2C - select IMX_HAVE_PLATFORM_IMX_UART - select IMX_HAVE_PLATFORM_MXC_EHCI - select IMX_HAVE_PLATFORM_MXC_NAND - select IMX_HAVE_PLATFORM_SPI_IMX - help - Include support for Eukrea CPUIMX51 platform. This includes - specific configurations for the module and its peripherals. - -choice - prompt "Baseboard" - depends on MACH_EUKREA_CPUIMX51 - default MACH_EUKREA_MBIMX51_BASEBOARD - -config MACH_EUKREA_MBIMX51_BASEBOARD - prompt "Eukrea MBIMX51 development board" - bool - select IMX_HAVE_PLATFORM_IMX_KEYPAD - select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX - select LEDS_GPIO_REGISTER - help - This adds board specific devices that can be found on Eukrea's - MBIMX51 evaluation board. - -endchoice - config MACH_EUKREA_CPUIMX51SD bool "Support Eukrea CPUIMX51SD module" select SOC_IMX51arch/arm/mach-mx5/Makefile +0
-2@@ -13,8 +13,6 @@ obj-$(CONFIG_MACH_MX53_EVK) += board-mx53_evk.o obj-$(CONFIG_MACH_MX53_SMD) += board-mx53_smd.o obj-$(CONFIG_MACH_MX53_LOCO) += board-mx53_loco.o obj-$(CONFIG_MACH_MX53_ARD) += board-mx53_ard.o -obj-$(CONFIG_MACH_EUKREA_CPUIMX51) += board-cpuimx51.o -obj-$(CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD) += eukrea_mbimx51-baseboard.o obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += board-cpuimx51sd.o obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd-baseboard.o obj-$(CONFIG_MX51_EFIKA_COMMON) += mx51_efika.oarch/arm/mach-mx5/board-cpuimx51.c deleted +0
-300@@ -1,300 +0,0 @@ -/* -* -* Copyright (C) 2010 Eric B?nard <[email protected]> -* -* based on board-mx51_babbage.c which is -* Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved. -* Copyright (C) 2009-2010 Amit Kucheria <[email protected]> -* -* The code contained herein is licensed under the GNU General Public -* License. You may obtain a copy of the GNU General Public License -* Version 2 or later at the following locations: -* -* http://www.opensource.org/licenses/gpl-license.html -* http://www.gnu.org/copyleft/gpl.html -*/ - -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/serial_8250.h> -#include <linux/i2c.h> -#include <linux/gpio.h> -#include <linux/delay.h> -#include <linux/io.h> -#include <linux/interrupt.h> - -#include <mach/eukrea-baseboards.h> -#include <mach/common.h> -#include <mach/hardware.h> -#include <mach/iomux-mx51.h> - -#include <asm/setup.h> -#include <asm/mach-types.h> -#include <asm/mach/arch.h> -#include <asm/mach/time.h> - -#include "devices-imx51.h" - -#define CPUIMX51_USBH1_STP IMX_GPIO_NR(1, 27) -#define CPUIMX51_QUARTA_GPIO IMX_GPIO_NR(3, 28) -#define CPUIMX51_QUARTB_GPIO IMX_GPIO_NR(3, 25) -#define CPUIMX51_QUARTC_GPIO IMX_GPIO_NR(3, 26) -#define CPUIMX51_QUARTD_GPIO IMX_GPIO_NR(3, 27) -#define CPUIMX51_QUART_XTAL 14745600 -#define CPUIMX51_QUART_REGSHIFT 17 - -/* USB_CTRL_1 */ -#define MX51_USB_CTRL_1_OFFSET 0x10 -#define MX51_USB_CTRL_UH1_EXT_CLK_EN (1 << 25) - -#define MX51_USB_PLLDIV_12_MHZ 0x00 -#define MX51_USB_PLL_DIV_19_2_MHZ 0x01 -#define MX51_USB_PLL_DIV_24_MHZ 0x02 - -static struct plat_serial8250_port serial_platform_data[] = { - { - .mapbase = (unsigned long )(MX51_CS1_BASE_ADDR +0x400000 ), - .irq =IMX_GPIO_TO_IRQ (CPUIMX51_QUARTA_GPIO ), - .irqflags =IRQF_TRIGGER_HIGH , - .uartclk =CPUIMX51_QUART_XTAL , - .regshift =CPUIMX51_QUART_REGSHIFT , - .iotype =UPIO_MEM , - .flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST |UPF_IOREMAP , - }, { - .mapbase = (unsigned long )(MX51_CS1_BASE_ADDR +0x800000 ), - .irq =IMX_GPIO_TO_IRQ (CPUIMX51_QUARTB_GPIO ), - .irqflags =IRQF_TRIGGER_HIGH , - .uartclk =CPUIMX51_QUART_XTAL , - .regshift =CPUIMX51_QUART_REGSHIFT , - .iotype =UPIO_MEM , - .flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST |UPF_IOREMAP , - }, { - .mapbase = (unsigned long )(MX51_CS1_BASE_ADDR +0x1000000 ), - .irq =IMX_GPIO_TO_IRQ (CPUIMX51_QUARTC_GPIO ), - .irqflags =IRQF_TRIGGER_HIGH , - .uartclk =CPUIMX51_QUART_XTAL , - .regshift =CPUIMX51_QUART_REGSHIFT , - .iotype =UPIO_MEM , - .flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST |UPF_IOREMAP , - }, { - .mapbase = (unsigned long )(MX51_CS1_BASE_ADDR +0x2000000 ), - .irq =IMX_GPIO_TO_IRQ (CPUIMX51_QUARTD_GPIO ), - .irqflags =IRQF_TRIGGER_HIGH , - .uartclk =CPUIMX51_QUART_XTAL , - .regshift =CPUIMX51_QUART_REGSHIFT , - .iotype =UPIO_MEM , - .flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST |UPF_IOREMAP , - }, { - } -}; - -static struct platform_device serial_device = { - .name ="serial8250" , - .id =0 , - .dev = { - .platform_data = serial_platform_data, - }, -}; - -static struct platform_device *devices[]__initdata = { - &serial_device, -}; - -static iomux_v3_cfg_t eukrea_cpuimx51_pads[] = { -/* UART1 */ -MX51_PAD_UART1_RXD__UART1_RXD , -MX51_PAD_UART1_TXD__UART1_TXD , -MX51_PAD_UART1_RTS__UART1_RTS , -MX51_PAD_UART1_CTS__UART1_CTS , - -/* I2C2 */ -MX51_PAD_GPIO1_2__I2C2_SCL , -MX51_PAD_GPIO1_3__I2C2_SDA , -MX51_PAD_NANDF_D10__GPIO3_30 , - -/* QUART IRQ */ -MX51_PAD_NANDF_D15__GPIO3_25 , -MX51_PAD_NANDF_D14__GPIO3_26 , -MX51_PAD_NANDF_D13__GPIO3_27 , -MX51_PAD_NANDF_D12__GPIO3_28 , - -/* USB HOST1 */ -MX51_PAD_USBH1_CLK__USBH1_CLK , -MX51_PAD_USBH1_DIR__USBH1_DIR , -MX51_PAD_USBH1_NXT__USBH1_NXT , -MX51_PAD_USBH1_DATA0__USBH1_DATA0 , -MX51_PAD_USBH1_DATA1__USBH1_DATA1 , -MX51_PAD_USBH1_DATA2__USBH1_DATA2 , -MX51_PAD_USBH1_DATA3__USBH1_DATA3 , -MX51_PAD_USBH1_DATA4__USBH1_DATA4 , -MX51_PAD_USBH1_DATA5__USBH1_DATA5 , -MX51_PAD_USBH1_DATA6__USBH1_DATA6 , -MX51_PAD_USBH1_DATA7__USBH1_DATA7 , -MX51_PAD_USBH1_STP__USBH1_STP , -}; - -static const struct mxc_nand_platform_data - eukrea_cpuimx51_nand_board_info__initconst = { - .width =1 , - .hw_ecc =1 , - .flash_bbt =1 , -}; - -static const struct imxuart_platform_data uart_pdata__initconst = { - .flags =IMXUART_HAVE_RTSCTS , -}; - -static const -struct imxi2c_platform_data eukrea_cpuimx51_i2c_data__initconst = { - .bitrate =100000 , -}; - -static struct i2c_board_info eukrea_cpuimx51_i2c_devices[] = { - { -I2C_BOARD_INFO ("pcf8563" ,0x51 ), - }, -}; - -/* This function is board specific as the bit mask for the plldiv will also -be different for other Freescale SoCs, thus a common bitmask is not -possible and cannot get place in /plat-mxc/ehci.c.*/ -static int initialize_otg_port (struct platform_device *pdev) -{ -u32 v; -void __iomem *usb_base; -void __iomem *usbother_base; - - usb_base =ioremap (MX51_USB_OTG_BASE_ADDR ,SZ_4K ); -if (!usb_base) -return -ENOMEM ; - usbother_base = usb_base +MX5_USBOTHER_REGS_OFFSET ; - -/* Set the PHY clock to 19.2MHz */ - v =__raw_readl (usbother_base +MXC_USB_PHY_CTR_FUNC2_OFFSET ); - v &= ~MX5_USB_UTMI_PHYCTRL1_PLLDIV_MASK ; - v |=MX51_USB_PLL_DIV_19_2_MHZ ; -__raw_writel (v, usbother_base +MXC_USB_PHY_CTR_FUNC2_OFFSET ); -iounmap (usb_base); - -mdelay (10 ); - -return mx51_initialize_usb_hw (0 ,MXC_EHCI_INTERNAL_PHY ); -} - -static int initialize_usbh1_port (struct platform_device *pdev) -{ -u32 v; -void __iomem *usb_base; -void __iomem *usbother_base; - - usb_base =ioremap (MX51_USB_OTG_BASE_ADDR ,SZ_4K ); -if (!usb_base) -return -ENOMEM ; - usbother_base = usb_base +MX5_USBOTHER_REGS_OFFSET ; - -/* The clock for the USBH1 ULPI port will come externally from the PHY. */ - v =__raw_readl (usbother_base +MX51_USB_CTRL_1_OFFSET ); -__raw_writel (v |MX51_USB_CTRL_UH1_EXT_CLK_EN , usbother_base +MX51_USB_CTRL_1_OFFSET ); -iounmap (usb_base); - -mdelay (10 ); - -return mx51_initialize_usb_hw (1 ,MXC_EHCI_POWER_PINS_ENABLED | -MXC_EHCI_ITC_NO_THRESHOLD ); -} - -static const struct mxc_usbh_platform_data dr_utmi_config__initconst = { - .init = initialize_otg_port, - .portsc =MXC_EHCI_UTMI_16BIT , -}; - -static const struct fsl_usb2_platform_data usb_pdata__initconst = { - .operating_mode =FSL_USB2_DR_DEVICE , - .phy_mode =FSL_USB2_PHY_UTMI_WIDE , -}; - -static const struct mxc_usbh_platform_data usbh1_config__initconst = { - .init = initialize_usbh1_port, - .portsc =MXC_EHCI_MODE_ULPI , -}; - -static int otg_mode_host; - -static int __init eukrea_cpuimx51_otg_mode (char *options) -{ -if (!strcmp (options,"host" )) - otg_mode_host =1 ; -else if (!strcmp (options,"device" )) - otg_mode_host =0 ; -else -pr_info ("otg_mode neither \"host\" nor \"device\". " -"Defaulting to device\n" ); -return 0 ; -} -__setup ("otg_mode=" , eukrea_cpuimx51_otg_mode); - -/* -* Board specific initialization. -*/ -static void __init eukrea_cpuimx51_init (void ) -{ -imx51_soc_init (); - -mxc_iomux_v3_setup_multiple_pads (eukrea_cpuimx51_pads, -ARRAY_SIZE (eukrea_cpuimx51_pads)); - -imx51_add_imx_uart (0 , &uart_pdata); -imx51_add_mxc_nand (&eukrea_cpuimx51_nand_board_info); - -gpio_request (CPUIMX51_QUARTA_GPIO ,"quarta_irq" ); -gpio_direction_input (CPUIMX51_QUARTA_GPIO ); -gpio_free (CPUIMX51_QUARTA_GPIO ); -gpio_request (CPUIMX51_QUARTB_GPIO ,"quartb_irq" ); -gpio_direction_input (CPUIMX51_QUARTB_GPIO ); -gpio_free (CPUIMX51_QUARTB_GPIO ); -gpio_request (CPUIMX51_QUARTC_GPIO ,"quartc_irq" ); -gpio_direction_input (CPUIMX51_QUARTC_GPIO ); -gpio_free (CPUIMX51_QUARTC_GPIO ); -gpio_request (CPUIMX51_QUARTD_GPIO ,"quartd_irq" ); -gpio_direction_input (CPUIMX51_QUARTD_GPIO ); -gpio_free (CPUIMX51_QUARTD_GPIO ); - -imx51_add_fec (NULL ); -platform_add_devices (devices,ARRAY_SIZE (devices)); - -imx51_add_imx_i2c (1 , &eukrea_cpuimx51_i2c_data); -i2c_register_board_info (1 , eukrea_cpuimx51_i2c_devices, -ARRAY_SIZE (eukrea_cpuimx51_i2c_devices)); - -if (otg_mode_host) -imx51_add_mxc_ehci_otg (&dr_utmi_config); -else { -initialize_otg_port (NULL ); -imx51_add_fsl_usb2_udc (&usb_pdata); - } -imx51_add_mxc_ehci_hs (1 , &usbh1_config); - -#ifdef CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD -eukrea_mbimx51_baseboard_init (); -#endif -} - -static void __init eukrea_cpuimx51_timer_init (void ) -{ -mx51_clocks_init (32768 ,24000000 ,22579200 ,0 ); -} - -static struct sys_timer mxc_timer = { - .init = eukrea_cpuimx51_timer_init, -}; - -MACHINE_START (EUKREA_CPUIMX51 ,"Eukrea CPUIMX51 Module" ) -/* Maintainer: Eric B?nard <[email protected]> */ - .atag_offset = 0x100, - .map_io = mx51_map_io, - .init_early = imx51_init_early, - .init_irq = mx51_init_irq, - .handle_irq = imx51_handle_irq, - .timer = &mxc_timer, - .init_machine = eukrea_cpuimx51_init, -MACHINE_END arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c deleted +0
-206@@ -1,206 +0,0 @@ -/* -* -* Copyright (C) 2010 Eric B?nard <[email protected]> -* -* The code contained herein is licensed under the GNU General Public -* License. You may obtain a copy of the GNU General Public License -* Version 2 or later at the following locations: -* -* http://www.opensource.org/licenses/gpl-license.html -* http://www.gnu.org/copyleft/gpl.html -*/ - -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/serial_8250.h> -#include <linux/i2c.h> -#include <linux/gpio.h> -#include <linux/io.h> -#include <linux/interrupt.h> -#include <linux/irq.h> -#include <linux/i2c/tsc2007.h> -#include <linux/leds.h> - -#include <mach/common.h> -#include <mach/hardware.h> -#include <mach/iomux-mx51.h> - -#include <asm/mach/arch.h> - -#include "devices-imx51.h" - -#define MBIMX51_TSC2007_GPIO IMX_GPIO_NR(3, 30) -#define MBIMX51_LED0 IMX_GPIO_NR(3, 5) -#define MBIMX51_LED1 IMX_GPIO_NR(3, 6) -#define MBIMX51_LED2 IMX_GPIO_NR(3, 7) -#define MBIMX51_LED3 IMX_GPIO_NR(3, 8) - -static const struct gpio_led mbimx51_leds[]__initconst = { - { - .name ="led0" , - .default_trigger ="heartbeat" , - .active_low =1 , - .gpio =MBIMX51_LED0 , - }, - { - .name ="led1" , - .default_trigger ="nand-disk" , - .active_low =1 , - .gpio =MBIMX51_LED1 , - }, - { - .name ="led2" , - .default_trigger ="mmc0" , - .active_low =1 , - .gpio =MBIMX51_LED2 , - }, - { - .name ="led3" , - .default_trigger ="default-on" , - .active_low =1 , - .gpio =MBIMX51_LED3 , - }, -}; - -static const struct gpio_led_platform_data mbimx51_leds_info__initconst = { - .leds = mbimx51_leds, - .num_leds =ARRAY_SIZE (mbimx51_leds), -}; - -static iomux_v3_cfg_t mbimx51_pads[] = { -/* UART2 */ -MX51_PAD_UART2_RXD__UART2_RXD , -MX51_PAD_UART2_TXD__UART2_TXD , - -/* UART3 */ -MX51_PAD_UART3_RXD__UART3_RXD , -MX51_PAD_UART3_TXD__UART3_TXD , -MX51_PAD_KEY_COL4__UART3_RTS , -MX51_PAD_KEY_COL5__UART3_CTS , - -/* TSC2007 IRQ */ -MX51_PAD_NANDF_D10__GPIO3_30 , - -/* LEDS */ -MX51_PAD_DISPB2_SER_DIN__GPIO3_5 , -MX51_PAD_DISPB2_SER_DIO__GPIO3_6 , -MX51_PAD_DISPB2_SER_CLK__GPIO3_7 , -MX51_PAD_DISPB2_SER_RS__GPIO3_8 , - -/* KPP */ -MX51_PAD_KEY_ROW0__KEY_ROW0 , -MX51_PAD_KEY_ROW1__KEY_ROW1 , -MX51_PAD_KEY_ROW2__KEY_ROW2 , -MX51_PAD_KEY_ROW3__KEY_ROW3 , -MX51_PAD_KEY_COL0__KEY_COL0 , -MX51_PAD_KEY_COL1__KEY_COL1 , -MX51_PAD_KEY_COL2__KEY_COL2 , -MX51_PAD_KEY_COL3__KEY_COL3 , - -/* SD 1 */ -MX51_PAD_SD1_CMD__SD1_CMD , -MX51_PAD_SD1_CLK__SD1_CLK , -MX51_PAD_SD1_DATA0__SD1_DATA0 , -MX51_PAD_SD1_DATA1__SD1_DATA1 , -MX51_PAD_SD1_DATA2__SD1_DATA2 , -MX51_PAD_SD1_DATA3__SD1_DATA3 , - -/* SD 2 */ -MX51_PAD_SD2_CMD__SD2_CMD , -MX51_PAD_SD2_CLK__SD2_CLK , -MX51_PAD_SD2_DATA0__SD2_DATA0 , -MX51_PAD_SD2_DATA1__SD2_DATA1 , -MX51_PAD_SD2_DATA2__SD2_DATA2 , -MX51_PAD_SD2_DATA3__SD2_DATA3 , -}; - -static const struct imxuart_platform_data uart_pdata__initconst = { - .flags =IMXUART_HAVE_RTSCTS , -}; - -static int mbimx51_keymap[] = { -KEY (0 ,0 ,KEY_1 ), -KEY (0 ,1 ,KEY_2 ), -KEY (0 ,2 ,KEY_3 ), -KEY (0 ,3 ,KEY_UP ), - -KEY (1 ,0 ,KEY_4 ), -KEY (1 ,1 ,KEY_5 ), -KEY (1 ,2 ,KEY_6 ), -KEY (1 ,3 ,KEY_LEFT ), - -KEY (2 ,0 ,KEY_7 ), -KEY (2 ,1 ,KEY_8 ), -KEY (2 ,2 ,KEY_9 ), -KEY (2 ,3 ,KEY_RIGHT ), - -KEY (3 ,0 ,KEY_0 ), -KEY (3 ,1 ,KEY_DOWN ), -KEY (3 ,2 ,KEY_ESC ), -KEY (3 ,3 ,KEY_ENTER ), -}; - -static const struct matrix_keymap_data mbimx51_map_data__initconst = { - .keymap = mbimx51_keymap, - .keymap_size =ARRAY_SIZE (mbimx51_keymap), -}; - -static int tsc2007_get_pendown_state (void ) -{ -return !gpio_get_value (MBIMX51_TSC2007_GPIO ); -} - -struct tsc2007_platform_data tsc2007_data = { - .model =2007 , - .x_plate_ohms =180 , - .get_pendown_state = tsc2007_get_pendown_state, -}; - -static struct i2c_board_info mbimx51_i2c_devices[] = { - { -I2C_BOARD_INFO ("tsc2007" ,0x49 ), - .irq =IMX_GPIO_TO_IRQ (MBIMX51_TSC2007_GPIO ), - .platform_data = &tsc2007_data, - }, { -I2C_BOARD_INFO ("tlv320aic23" ,0x1a ), - }, -}; - -/* -* baseboard initialization. -*/ -void __init eukrea_mbimx51_baseboard_init (void ) -{ -mxc_iomux_v3_setup_multiple_pads (mbimx51_pads, -ARRAY_SIZE (mbimx51_pads)); - -imx51_add_imx_uart (1 ,NULL ); -imx51_add_imx_uart (2 , &uart_pdata); - -gpio_request (MBIMX51_LED0 ,"LED0" ); -gpio_direction_output (MBIMX51_LED0 ,1 ); -gpio_free (MBIMX51_LED0 ); -gpio_request (MBIMX51_LED1 ,"LED1" ); -gpio_direction_output (MBIMX51_LED1 ,1 ); -gpio_free (MBIMX51_LED1 ); -gpio_request (MBIMX51_LED2 ,"LED2" ); -gpio_direction_output (MBIMX51_LED2 ,1 ); -gpio_free (MBIMX51_LED2 ); -gpio_request (MBIMX51_LED3 ,"LED3" ); -gpio_direction_output (MBIMX51_LED3 ,1 ); -gpio_free (MBIMX51_LED3 ); - -gpio_led_register_device (-1 , &mbimx51_leds_info); - -imx51_add_imx_keypad (&mbimx51_map_data); - -gpio_request (MBIMX51_TSC2007_GPIO ,"tsc2007_irq" ); -gpio_direction_input (MBIMX51_TSC2007_GPIO ); -irq_set_irq_type (gpio_to_irq (MBIMX51_TSC2007_GPIO ), -IRQF_TRIGGER_FALLING ); -i2c_register_board_info (1 , mbimx51_i2c_devices, -ARRAY_SIZE (mbimx51_i2c_devices)); - -imx51_add_sdhci_esdhc_imx (0 ,NULL ); -imx51_add_sdhci_esdhc_imx (1 ,NULL ); -}Signature · 1 line
1.7.6.4
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Re: [PATCH 16/19] eukrea-cpuimx51: remove board
Hi Sascha,
Le 13/12/2011 11:05, Sascha Hauer a ?crit :
Quoted 5 lines · Eric B?nard
Quoted 1 line
this board is not maintained anymore and is replaced by cpuimx51sd
I'm happy to remove this code, but aren't there any users of this board?
not any that would need a kernel upgrade considering the Freescale proprietary drivers used on it :-(
Thanks,
Eric
Re: [PATCH 16/19] eukrea-cpuimx51: remove board
Quoted 4 lines · Eric B?nard
Hi Sascha,
Le 13/12/2011 11:05, Sascha Hauer a ?crit :
Quoted 1 line · Eric B?nard
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
this board is not maintained anymore and is replaced by cpuimx51sd
I'm happy to remove this code, but aren't there any users of this board?
not any that would need a kernel upgrade considering the Freescale proprietary drivers used on it :-(
Thanks,
Eric
Just for posterity, could you list the drivers that make an upgrade impossible?
IMHO, if these boards were sold commercially we should maintain support if there is a chance that we will get open drivers in the future.
OTOH, if you can tell who each of these boards to, it is probably a good target for removal. :)
/Amit
Signature · 3 lines
-------------------------------------------------------------------------------- Amit Kucheria, Power Management Tech Lead, Linaro || amit.kucheria at canonical.com --------------------------------------------------------------------------------
Re: [PATCH 16/19] eukrea-cpuimx51: remove board
Hi Amit,
Le 15/12/2011 04:58, Amit Kucheria a ?crit :
Quoted 9 lines · Eric B?nard
Quoted 8 lines
Hi Sascha,
Le 13/12/2011 11:05, Sascha Hauer a ?crit :
Quoted 5 lines · Eric B?nard
Quoted 1 line
this board is not maintained anymore and is replaced by cpuimx51sd
I'm happy to remove this code, but aren't there any users of this board?
Quoted 8 lines
Quoted 4 lines
not any that would need a kernel upgrade considering the Freescale proprietary drivers used on it :-(
Thanks,
EricJust for posterity, could you list the drivers that make an upgrade impossible?
at least gpu (AMD/FSL proprietary) & iirc video codecs (not all proprietary but far from mainline unless I missed something). In fact in the end these boards were using Freescale's kernel.
Quoted 6 lines
IMHO, if these boards were sold commercially we should maintain support if there is a chance that we will get open drivers in the future.
OTOH, if you can tell who each of these boards to, it is probably a good target for removal. :)
I confirm that's a good target for removal as our i.MX51 customers are actually using cpuimx51sd (actually without 3D & codecs actually but not everyone need these peripherals in industrial applications). Moreover, if all the drivers are mainlined we will be able to use dt if we want to upgrade cpuimx51.
Thanks,
Eric
PATCH 17/19 cpuimx51sd: add watchdog support
In reply to Eric Bénard--- arch/arm/mach-mx5/Kconfig | 1 + arch/arm/mach-mx5/board-cpuimx51sd.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-mx5/Kconfig +1 -0
@@ -99,6 +99,7 @@ config MACH_EUKREA_CPUIMX51SD select IMX_HAVE_PLATFORM_FSL_USB2_UDC select IMX_HAVE_PLATFORM_IMX_I2C select IMX_HAVE_PLATFORM_IMX_UART + select IMX_HAVE_PLATFORM_IMX2_WDT select IMX_HAVE_PLATFORM_MXC_EHCI select IMX_HAVE_PLATFORM_MXC_NAND select IMX_HAVE_PLATFORM_SPI_IMX
arch/arm/mach-mx5/board-cpuimx51sd.c +1 -0
@@ -272,6 +272,7 @@ static void __init eukrea_cpuimx51sd_init(void)imx51_add_imx_uart (0 , &uart_pdata);imx51_add_mxc_nand (&eukrea_cpuimx51sd_nand_board_info); +imx51_add_imx2_wdt (0 ,NULL );gpio_request (ETH_RST ,"eth_rst" );gpio_set_value (ETH_RST ,1 );
Signature · 1 line
1.7.6.4
PATCH 18/19 mbimx51sd: add audio codec support
In reply to Eric Bénard--- arch/arm/mach-mx5/Kconfig | 1 + arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c | 28 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 0 deletions(-)
arch/arm/mach-mx5/Kconfig +1 -0
@@ -115,6 +115,7 @@ choice config MACH_EUKREA_MBIMXSD51_BASEBOARD prompt "Eukrea MBIMXSD development board" bool + select IMX_HAVE_PLATFORM_IMX_SSI select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX select LEDS_GPIO_REGISTER help
arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c +28 -0
@@ -67,6 +67,11 @@ static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = {NEW_PAD_CTRL (MX51_PAD_GPIO1_0__SD1_CD ,PAD_CTL_PUS_22K_UP |PAD_CTL_PKE |PAD_CTL_SRE_FAST |PAD_CTL_DSE_HIGH |PAD_CTL_PUE |PAD_CTL_HYS ), +/* SSI */ +MX51_PAD_AUD3_BB_TXD__AUD3_TXD , +MX51_PAD_AUD3_BB_RXD__AUD3_RXD , +MX51_PAD_AUD3_BB_CK__AUD3_TXC , + MX51_PAD_AUD3_BB_FS__AUD3_TXFS, };#define GPIO_LED1 IMX_GPIO_NR(3, 30)
@@ -113,6 +118,11 @@ static struct i2c_board_info eukrea_mbimxsd_i2c_devices[] = { }, }; +static const +struct imx_ssi_platform_data eukrea_mbimxsd_ssi_pdata__initconst = { + .flags =IMX_SSI_SYN |IMX_SSI_NET |IMX_SSI_USE_I2S_SLAVE , +}; +/* * system init for baseboard usage. Will be called by cpuimx51sd init. *
@@ -125,11 +135,29 @@ void __init eukrea_mbimxsd51_baseboard_init(void) ARRAY_SIZE(eukrea_mbimxsd_pads)))printk (KERN_ERR "error setting mbimxsd pads !\n" ); +#if defined(CONFIG_SND_SOC_EUKREA_TLV320 ) +/* SSI unit master I2S codec connected to SSI_AUD3 */ +mxc_audmux_v2_configure_port (0 , +MXC_AUDMUX_V2_PTCR_SYN | +MXC_AUDMUX_V2_PTCR_TFSDIR | +MXC_AUDMUX_V2_PTCR_TFSEL (2 ) | +MXC_AUDMUX_V2_PTCR_TCLKDIR | +MXC_AUDMUX_V2_PTCR_TCSEL (2 ), +MXC_AUDMUX_V2_PDCR_RXDSEL (2 ) + ); +mxc_audmux_v2_configure_port (2 , +MXC_AUDMUX_V2_PTCR_SYN | +MXC_AUDMUX_V2_PTCR_TCSEL (0 ), +MXC_AUDMUX_V2_PDCR_RXDSEL (0 ) + ); +#endif imx51_add_imx_uart (1 ,NULL );imx51_add_imx_uart (2 , &uart_pdata);imx51_add_sdhci_esdhc_imx (0 ,NULL ); +imx51_add_imx_ssi (0 , &eukrea_mbimxsd_ssi_pdata); +gpio_request (GPIO_LED1 ,"LED1" );gpio_direction_output (GPIO_LED1 ,1 );gpio_free (GPIO_LED1 );
Signature · 1 line
1.7.6.4
PATCH 19/19 eukrea-cpuimx51sd: support rev2 PCB
In reply to Eric Bénardrev1 were shipped with silicon 2.0, rev2 with silicon 3.0 so we are using the silicon version to know the PCB revision
--- arch/arm/mach-mx5/board-cpuimx51sd.c | 48 ++++++++++++++++++++++++++++----- 1 files changed, 40 insertions(+), 8 deletions(-)
arch/arm/mach-mx5/board-cpuimx51sd.c +40 -8
@@ -41,11 +41,13 @@#define USBH1_RST IMX_GPIO_NR(2, 28)#define ETH_RST IMX_GPIO_NR(2, 31) -#define TSC2007_IRQGPIO IMX_GPIO_NR(3, 12) +#define TSC2007_IRQGPIO_REV2 IMX_GPIO_NR(3, 12) +#define TSC2007_IRQGPIO_REV3 IMX_GPIO_NR(4, 0)#define CAN_IRQGPIO IMX_GPIO_NR(1, 1)#define CAN_RST IMX_GPIO_NR(4, 15)#define CAN_NCS IMX_GPIO_NR(4, 24) -#define CAN_RXOBF IMX_GPIO_NR(1, 4) +#define CAN_RXOBF_REV2 IMX_GPIO_NR(1, 4) +#define CAN_RXOBF_REV3 IMX_GPIO_NR(3, 12)#define CAN_RX1BF IMX_GPIO_NR(1, 6)#define CAN_TXORTS IMX_GPIO_NR(1, 7)#define CAN_TX1RTS IMX_GPIO_NR(1, 8)
@@ -89,6 +91,9 @@ static iomux_v3_cfg_t eukrea_cpuimx51sd_pads[] = {/* HSI2C */ MX51_PAD_I2C1_CLK__GPIO4_16 ,MX51_PAD_I2C1_DAT__GPIO4_17 , +/* I2C1 */ +MX51_PAD_SD2_CMD__I2C1_SCL , +MX51_PAD_SD2_CLK__I2C1_SDA ,/* CAN */ MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI,
@@ -108,15 +113,27 @@ static iomux_v3_cfg_t eukrea_cpuimx51sd_pads[] = {NEW_PAD_CTRL (MX51_PAD_GPIO_NAND__GPIO_NAND ,PAD_CTL_PUS_22K_UP |PAD_CTL_PKE |PAD_CTL_SRE_FAST |PAD_CTL_DSE_HIGH |PAD_CTL_PUE |PAD_CTL_HYS ), +NEW_PAD_CTRL (MX51_PAD_NANDF_D8__GPIO4_0 ,PAD_CTL_PUS_22K_UP | +PAD_CTL_PKE |PAD_CTL_SRE_FAST | + PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS), };static const struct imxuart_platform_data uart_pdata__initconst = { .flags =IMXUART_HAVE_RTSCTS , }; +static int tsc2007_get_pendown_state (void ) +{ +if (mx51_revision () <IMX_CHIP_REVISION_3_0 ) +return !gpio_get_value (TSC2007_IRQGPIO_REV2 ); +else +return !gpio_get_value (TSC2007_IRQGPIO_REV3 ); +} +static struct tsc2007_platform_data tsc2007_info = { .model =2007 , .x_plate_ohms =180 , + .get_pendown_state = tsc2007_get_pendown_state, }; static struct i2c_board_info eukrea_cpuimx51sd_i2c_devices[] = {
@@ -126,7 +143,6 @@ static struct i2c_board_info eukrea_cpuimx51sd_i2c_devices[] = { I2C_BOARD_INFO("tsc2007", 0x49), .type = "tsc2007", .platform_data = &tsc2007_info, - .irq = IMX_GPIO_TO_IRQ(TSC2007_IRQGPIO), }, };
@@ -255,10 +271,14 @@ static const struct spi_imx_master cpuimx51sd_ecspi1_pdata __initconst = { .num_chipselect = ARRAY_SIZE(cpuimx51sd_spi1_cs), }; -static struct platform_device *platform_devices[]__initdata = { +static struct platform_device *rev2_platform_devices[]__initdata = { &hsi2c_gpio_device, }; +static const struct imxi2c_platform_data cpuimx51sd_i2c_data__initconst = { + .bitrate =100000 , +}; +static void __init eukrea_cpuimx51sd_init (void ) {imx51_soc_init ();
@@ -292,13 +312,25 @@ static void __init eukrea_cpuimx51sd_init(void)spi_register_board_info (cpuimx51sd_spi_device,ARRAY_SIZE (cpuimx51sd_spi_device)); -gpio_request (TSC2007_IRQGPIO ,"tsc2007_irq" ); -gpio_direction_input (TSC2007_IRQGPIO ); -gpio_free (TSC2007_IRQGPIO ); +if (mx51_revision () <IMX_CHIP_REVISION_3_0 ) { + eukrea_cpuimx51sd_i2c_devices[1 ].irq = +gpio_to_irq (TSC2007_IRQGPIO_REV2 ), +platform_add_devices (rev2_platform_devices, +ARRAY_SIZE (rev2_platform_devices)); +gpio_request (TSC2007_IRQGPIO_REV2 ,"tsc2007_irq" ); +gpio_direction_input (TSC2007_IRQGPIO_REV2 ); +gpio_free (TSC2007_IRQGPIO_REV2 ); + }else { + eukrea_cpuimx51sd_i2c_devices[1 ].irq = +gpio_to_irq (TSC2007_IRQGPIO_REV3 ), +imx51_add_imx_i2c (0 , &cpuimx51sd_i2c_data); +gpio_request (TSC2007_IRQGPIO_REV3 ,"tsc2007_irq" ); +gpio_direction_input (TSC2007_IRQGPIO_REV3 ); +gpio_free (TSC2007_IRQGPIO_REV3 ); + }i2c_register_board_info (0 , eukrea_cpuimx51sd_i2c_devices,ARRAY_SIZE (eukrea_cpuimx51sd_i2c_devices)); -platform_add_devices (platform_devices,ARRAY_SIZE (platform_devices));if (otg_mode_host)imx51_add_mxc_ehci_otg (&dr_utmi_config);
Signature · 1 line
1.7.6.4
Sascha Hauer
maintainerHi Eric,
To make the handling of your patches easier, please
- send a cover letter for multiple patches
- separate them at least by fixes and features
- if possible, do not send patches aimed at multiple maintainers in a single series.
I picked every patch looking like a fix for now myself, but please remember next time. I'll have a look at the non-fix patches later.
Sascha
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Quoted 5 lines · Eric B?nard
this patch gives the possibility to workaround bug ENGcm09152 on i.MX25 when the hardware workaround is also implemented on the board.
It covers the workaround described on page 42 of the following Errata :
http://cache.freescale.com/files/dsp/doc/errata/IMX25CE.pdf
Nit: The title of the ENG would help reviewing, like it is preferred to cite patch titles when mentioning the commit-id.
Signature · 9 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20111213/406be699/attachment.sig>
PATCH v2 1/19 mxc_udc: add workaround for ENGcm09152 for i.MX25
this patch gives the possibility to workaround bug ENGcm09152 on i.MX25 when the hardware workaround is also implemented on the board.
It covers the workaround described on page 42 of the following Errata, titled "USB: UTMI_USBPHY VBUS input impedance implementation error" :
http://cache.freescale.com/files/dsp/doc/errata/IMX25CE.pdf
--- drivers/usb/gadget/fsl_mxc_udc.c | 22 +++++++++++++--------- 1 files changed, 13 insertions(+), 9 deletions(-)
drivers/usb/gadget/fsl_mxc_udc.c +13 -9
@@ -23,7 +23,7 @@static struct clk *mxc_ahb_clk;static struct clk *mxc_usb_clk; -/* workaround ENGcm09152 for i.MX35 */ +/* workaround ENGcm09152 for i.MX25/35 */ #define USBPHYCTRL_OTGBASE_OFFSET 0x608#define USBPHYCTRL_EVDO (1 << 23)
@@ -89,16 +89,20 @@ eenahb:void fsl_udc_clk_finalize (struct platform_device *pdev) {struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data; -if (cpu_is_mx35 ()) { +if (cpu_is_mx25 () ||cpu_is_mx35 ()) {unsigned int v; - -/* workaround ENGcm09152 for i.MX35 */ +void __iomem *otgbase; +if (cpu_is_mx25 ()) + otgbase =MX25_IO_ADDRESS (MX25_USB_BASE_ADDR + +USBPHYCTRL_OTGBASE_OFFSET ); +else if (cpu_is_mx35 ()) + otgbase =MX35_IO_ADDRESS (MX35_USB_BASE_ADDR + +USBPHYCTRL_OTGBASE_OFFSET ); + +/* workaround ENGcm09152 for i.MX25/35 */ if (pdata->workaround &FLS_USB2_WORKAROUND_ENGCM09152 ) { - v =readl (MX35_IO_ADDRESS (MX35_USB_BASE_ADDR + -USBPHYCTRL_OTGBASE_OFFSET )); -writel (v |USBPHYCTRL_EVDO , -MX35_IO_ADDRESS (MX35_USB_BASE_ADDR + -USBPHYCTRL_OTGBASE_OFFSET )); + v =readl (otgbase); +writel (v |USBPHYCTRL_EVDO , otgbase); } }
Signature · 1 line
1.7.6.4
Hi,
Quoted 11 lines · Eric B?nard
this patch gives the possibility to workaround bug ENGcm09152 on i.MX25 when the hardware workaround is also implemented on the board.
It covers the workaround described on page 42 of the following Errata, titled "USB:UTMI_USBPHYVBUS input impedance implementation error" :
http://cache.freescale.com/files/dsp/doc/errata/IMX25CE.pdfSigned-off-by Eric B?nard <[email protected]>Cc Sascha Hauer <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Li Yang <[email protected]>
Sascha, are you taking this one or should I take it ? One comment below though.
Quoted 23 lines
--- drivers/usb/gadget/fsl_mxc_udc.c | 22 +++++++++++++--------- 1 files changed, 13 insertions(+), 9 deletions(-)drivers/usb/gadget/fsl_mxc_udc.c +2
-2@@ -23,7 +23,7 @@static struct clk *mxc_ahb_clk;static struct clk *mxc_usb_clk; -/* workaround ENGcm09152 for i.MX35 */ +/* workaround ENGcm09152 for i.MX25/35 */ #define USBPHYCTRL_OTGBASE_OFFSET 0x608#define USBPHYCTRL_EVDO (1 << 23)@@ -89,16 +89,20 @@ eenahb:void fsl_udc_clk_finalize (struct platform_device *pdev) {struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data; -if (cpu_is_mx35 ()) { +if (cpu_is_mx25 () ||cpu_is_mx35 ()) {
drivers/usb/gadget/fsl_mxc_udc.c eenahb: · line 100
Quoted 10 lines
drivers/usb/gadget/fsl_mxc_udc.c +7
-2unsigned int v; - -/* workaround ENGcm09152 for i.MX35 */ +void __iomem *otgbase; +if (cpu_is_mx25 ()) + otgbase =MX25_IO_ADDRESS (MX25_USB_BASE_ADDR + +USBPHYCTRL_OTGBASE_OFFSET ); +else if (cpu_is_mx35 ()) + otgbase =MX35_IO_ADDRESS (MX35_USB_BASE_ADDR + +USBPHYCTRL_OTGBASE_OFFSET );
I don't want to see cpu_is_* or machine_is_* or <plat/*> or <mach/*> anywhere on drivers, please make sure to remove them for 3.4 merge window the latest. You should also make sure that this driver has no static globals. IOW, I would like to be able to have multiple instances of this driver working fine.
Granted, you have no boards with such setup, but we made that mistake on musb driver and now we have a bunch of other stuff to rework in order to get our dual-MUSB board to work ;-)
I also see that fsl_udc_core.c is still not using dev_pm_ops, please fix that too.
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20111213/4da9192b/attachment.sig>