aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5/mx51_efika.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2011-10-07 15:57:31 -0400
committerArnd Bergmann <arnd@arndb.de>2011-10-07 15:57:31 -0400
commit526b264163068f77c5f2409031f5e25caf3900a9 (patch)
tree196e7581f1546e48ba392ff099f369e5c622636b /arch/arm/mach-mx5/mx51_efika.c
parent4c4cbce68f57555cddb9d77da333bf50875148ce (diff)
parent05d900c9d8ce536c6792efb323c82b1c97b54bf9 (diff)
Merge branch 'imx/cleanup' into imx/devel
This helps resolve the conflicts between the imx cleanups and the new code that has gone into the imx tree. Conflict resolution was originally done by Sascha Hauer. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-mx5/mx51_efika.c')
-rw-r--r--arch/arm/mach-mx5/mx51_efika.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/arch/arm/mach-mx5/mx51_efika.c b/arch/arm/mach-mx5/mx51_efika.c
index 9dc3a869033c..b004e178417d 100644
--- a/arch/arm/mach-mx5/mx51_efika.c
+++ b/arch/arm/mach-mx5/mx51_efika.c
@@ -34,14 +34,12 @@
34#include <linux/usb/ulpi.h> 34#include <linux/usb/ulpi.h>
35#include <mach/ulpi.h> 35#include <mach/ulpi.h>
36 36
37#include <asm/irq.h>
38#include <asm/setup.h> 37#include <asm/setup.h>
39#include <asm/mach-types.h> 38#include <asm/mach-types.h>
40#include <asm/mach/arch.h> 39#include <asm/mach/arch.h>
41#include <asm/mach/time.h> 40#include <asm/mach/time.h>
42 41
43#include "devices-imx51.h" 42#include "devices-imx51.h"
44#include "devices.h"
45#include "efika.h" 43#include "efika.h"
46#include "cpu_op-mx51.h" 44#include "cpu_op-mx51.h"
47 45
@@ -133,7 +131,7 @@ static int initialize_otg_port(struct platform_device *pdev)
133 u32 v; 131 u32 v;
134 void __iomem *usb_base; 132 void __iomem *usb_base;
135 void __iomem *usbother_base; 133 void __iomem *usbother_base;
136 usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); 134 usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
137 if (!usb_base) 135 if (!usb_base)
138 return -ENOMEM; 136 return -ENOMEM;
139 usbother_base = (void __iomem *)(usb_base + MX5_USBOTHER_REGS_OFFSET); 137 usbother_base = (void __iomem *)(usb_base + MX5_USBOTHER_REGS_OFFSET);
@@ -150,7 +148,7 @@ static int initialize_otg_port(struct platform_device *pdev)
150 return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_INTERNAL_PHY); 148 return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_INTERNAL_PHY);
151} 149}
152 150
153static struct mxc_usbh_platform_data dr_utmi_config = { 151static const struct mxc_usbh_platform_data dr_utmi_config __initconst = {
154 .init = initialize_otg_port, 152 .init = initialize_otg_port,
155 .portsc = MXC_EHCI_UTMI_16BIT, 153 .portsc = MXC_EHCI_UTMI_16BIT,
156}; 154};
@@ -170,7 +168,7 @@ static int initialize_usbh1_port(struct platform_device *pdev)
170 gpio_set_value(EFIKAMX_USBH1_STP, 1); 168 gpio_set_value(EFIKAMX_USBH1_STP, 1);
171 msleep(1); 169 msleep(1);
172 170
173 usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); 171 usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
174 socregs_base = (void __iomem *)(usb_base + MX5_USBOTHER_REGS_OFFSET); 172 socregs_base = (void __iomem *)(usb_base + MX5_USBOTHER_REGS_OFFSET);
175 173
176 /* The clock for the USBH1 ULPI port will come externally */ 174 /* The clock for the USBH1 ULPI port will come externally */
@@ -189,7 +187,7 @@ static int initialize_usbh1_port(struct platform_device *pdev)
189 return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_ITC_NO_THRESHOLD); 187 return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_ITC_NO_THRESHOLD);
190} 188}
191 189
192static struct mxc_usbh_platform_data usbh1_config = { 190static struct mxc_usbh_platform_data usbh1_config __initdata = {
193 .init = initialize_usbh1_port, 191 .init = initialize_usbh1_port,
194 .portsc = MXC_EHCI_MODE_ULPI, 192 .portsc = MXC_EHCI_MODE_ULPI,
195}; 193};
@@ -217,9 +215,9 @@ static void __init mx51_efika_usb(void)
217 usbh1_config.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | 215 usbh1_config.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
218 ULPI_OTG_DRVVBUS_EXT | ULPI_OTG_EXTVBUSIND); 216 ULPI_OTG_DRVVBUS_EXT | ULPI_OTG_EXTVBUSIND);
219 217
220 mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config); 218 imx51_add_mxc_ehci_otg(&dr_utmi_config);
221 if (usbh1_config.otg) 219 if (usbh1_config.otg)
222 mxc_register_device(&mxc_usbh1_device, &usbh1_config); 220 imx51_add_mxc_ehci_hs(1, &usbh1_config);
223} 221}
224 222
225static struct mtd_partition mx51_efika_spi_nor_partitions[] = { 223static struct mtd_partition mx51_efika_spi_nor_partitions[] = {
@@ -589,7 +587,7 @@ static struct spi_board_info mx51_efika_spi_board_info[] __initdata = {
589 .bus_num = 0, 587 .bus_num = 0,
590 .chip_select = 0, 588 .chip_select = 0,
591 .platform_data = &mx51_efika_mc13892_data, 589 .platform_data = &mx51_efika_mc13892_data,
592 .irq = gpio_to_irq(EFIKAMX_PMIC), 590 .irq = IMX_GPIO_TO_IRQ(EFIKAMX_PMIC),
593 }, 591 },
594}; 592};
595 593
@@ -632,4 +630,3 @@ void __init efika_board_common_init(void)
632 get_cpu_op = mx51_get_cpu_op; 630 get_cpu_op = mx51_get_cpu_op;
633#endif 631#endif
634} 632}
635