Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'mxc-master' of git://git.pengutronix.de/git/imx/linux-2.6 into devel

authored by

Russell King and committed by
Russell King
2d8d2493 c0683039

+1123 -29
+8
arch/arm/mach-mx2/Kconfig
··· 59 59 help 60 60 Include support for MX27PDK platform. This includes specific 61 61 configurations for the board and its peripherals. 62 + 63 + config MACH_MX27LITE 64 + bool "LogicPD MX27 LITEKIT platform" 65 + depends on MACH_MX27 66 + help 67 + Include support for MX27 LITEKIT platform. This includes specific 68 + configurations for the board and its peripherals. 69 + 62 70 endif
+2
arch/arm/mach-mx2/Makefile
··· 16 16 obj-$(CONFIG_MACH_PCM038) += pcm038.o 17 17 obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o 18 18 obj-$(CONFIG_MACH_MX27_3DS) += mx27pdk.o 19 + obj-$(CONFIG_MACH_MX27LITE) += mx27lite.o 20 +
+51 -26
arch/arm/mach-mx2/clock_imx21.c
··· 48 48 __raw_writel(reg, clk->enable_reg); 49 49 } 50 50 51 + static unsigned long _clk_generic_round_rate(struct clk *clk, 52 + unsigned long rate, 53 + u32 max_divisor) 54 + { 55 + u32 div; 56 + unsigned long parent_rate; 57 + 58 + parent_rate = clk_get_rate(clk->parent); 59 + 60 + div = parent_rate / rate; 61 + if (parent_rate % rate) 62 + div++; 63 + 64 + if (div > max_divisor) 65 + div = max_divisor; 66 + 67 + return parent_rate / div; 68 + } 69 + 51 70 static int _clk_spll_enable(struct clk *clk) 52 71 { 53 72 u32 reg; ··· 97 78 static unsigned long _clk_perclkx_round_rate(struct clk *clk, 98 79 unsigned long rate) 99 80 { 100 - u32 div; 101 - unsigned long parent_rate; 102 - 103 - parent_rate = clk_get_rate(clk->parent); 104 - 105 - div = parent_rate / rate; 106 - if (parent_rate % rate) 107 - div++; 108 - 109 - if (div > 64) 110 - div = 64; 111 - 112 - return parent_rate / div; 81 + return _clk_generic_round_rate(clk, rate, 64); 113 82 } 114 83 115 84 static int _clk_perclkx_set_rate(struct clk *clk, unsigned long rate) ··· 135 128 usb_pdf = (CSCR() & CCM_CSCR_USB_MASK) >> CCM_CSCR_USB_OFFSET; 136 129 137 130 return parent_rate / (usb_pdf + 1U); 131 + } 132 + 133 + static unsigned long _clk_usb_round_rate(struct clk *clk, 134 + unsigned long rate) 135 + { 136 + return _clk_generic_round_rate(clk, rate, 8); 137 + } 138 + 139 + static int _clk_usb_set_rate(struct clk *clk, unsigned long rate) 140 + { 141 + u32 reg; 142 + u32 div; 143 + unsigned long parent_rate; 144 + 145 + parent_rate = clk_get_rate(clk->parent); 146 + 147 + div = parent_rate / rate; 148 + if (div > 8 || div < 1 || ((parent_rate / div) != rate)) 149 + return -EINVAL; 150 + div--; 151 + 152 + reg = CSCR() & ~CCM_CSCR_USB_MASK; 153 + reg |= div << CCM_CSCR_USB_OFFSET; 154 + __raw_writel(reg, CCM_CSCR); 155 + 156 + return 0; 138 157 } 139 158 140 159 static unsigned long _clk_ssix_recalc(struct clk *clk, unsigned long pdf) ··· 628 595 static struct clk usb_clk[] = { 629 596 { 630 597 .parent = &spll_clk, 598 + .secondary = &usb_clk[1], 631 599 .get_rate = _clk_usb_recalc, 632 600 .enable = _clk_enable, 633 601 .enable_reg = CCM_PCCR_USBOTG_REG, 634 602 .enable_shift = CCM_PCCR_USBOTG_OFFSET, 635 603 .disable = _clk_disable, 604 + .round_rate = _clk_usb_round_rate, 605 + .set_rate = _clk_usb_set_rate, 636 606 }, { 637 607 .parent = &hclk_clk, 638 608 .enable = _clk_enable, ··· 804 768 805 769 static unsigned long _clk_clko_round_rate(struct clk *clk, unsigned long rate) 806 770 { 807 - u32 div; 808 - unsigned long parent_rate; 809 - 810 - parent_rate = clk_get_rate(clk->parent); 811 - div = parent_rate / rate; 812 - if (parent_rate % rate) 813 - div++; 814 - 815 - if (div > 8) 816 - div = 8; 817 - 818 - return parent_rate / div; 771 + return _clk_generic_round_rate(clk, rate, 8); 819 772 } 820 773 821 774 static int _clk_clko_set_rate(struct clk *clk, unsigned long rate) ··· 946 921 _REGISTER_CLOCK(NULL, "cspi3", cspi_clk[2]) 947 922 _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk[0]) 948 923 _REGISTER_CLOCK(NULL, "csi", csi_clk[0]) 949 - _REGISTER_CLOCK(NULL, "usb", usb_clk[0]) 924 + _REGISTER_CLOCK("imx21-hcd.0", NULL, usb_clk[0]) 950 925 _REGISTER_CLOCK(NULL, "ssi1", ssi_clk[0]) 951 926 _REGISTER_CLOCK(NULL, "ssi2", ssi_clk[1]) 952 927 _REGISTER_CLOCK("mxc_nand.0", NULL, nfc_clk)
+95
arch/arm/mach-mx2/mx27lite.c
··· 1 + /* 2 + * Copyright 2007 Robert Schwebel <r.schwebel@pengutronix.de>, Pengutronix 3 + * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) 4 + * Copyright 2009 Daniel Schaeffer (daniel.schaeffer@timesys.com) 5 + * 6 + * This program is free software; you can redistribute it and/or modify 7 + * it under the terms of the GNU General Public License as published by 8 + * the Free Software Foundation; either version 2 of the License, or 9 + * (at your option) any later version. 10 + * 11 + * This program is distributed in the hope that it will be useful, 12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + * GNU General Public License for more details. 15 + * 16 + * You should have received a copy of the GNU General Public License 17 + * along with this program; if not, write to the Free Software 18 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 + */ 20 + 21 + #include <linux/platform_device.h> 22 + #include <linux/gpio.h> 23 + #include <asm/mach-types.h> 24 + #include <asm/mach/arch.h> 25 + #include <asm/mach/time.h> 26 + #include <asm/mach/map.h> 27 + #include <mach/hardware.h> 28 + #include <mach/common.h> 29 + #include <mach/imx-uart.h> 30 + #include <mach/iomux.h> 31 + #include <mach/board-mx27lite.h> 32 + 33 + #include "devices.h" 34 + 35 + static unsigned int mx27lite_pins[] = { 36 + /* UART1 */ 37 + PE12_PF_UART1_TXD, 38 + PE13_PF_UART1_RXD, 39 + PE14_PF_UART1_CTS, 40 + PE15_PF_UART1_RTS, 41 + /* FEC */ 42 + PD0_AIN_FEC_TXD0, 43 + PD1_AIN_FEC_TXD1, 44 + PD2_AIN_FEC_TXD2, 45 + PD3_AIN_FEC_TXD3, 46 + PD4_AOUT_FEC_RX_ER, 47 + PD5_AOUT_FEC_RXD1, 48 + PD6_AOUT_FEC_RXD2, 49 + PD7_AOUT_FEC_RXD3, 50 + PD8_AF_FEC_MDIO, 51 + PD9_AIN_FEC_MDC, 52 + PD10_AOUT_FEC_CRS, 53 + PD11_AOUT_FEC_TX_CLK, 54 + PD12_AOUT_FEC_RXD0, 55 + PD13_AOUT_FEC_RX_DV, 56 + PD14_AOUT_FEC_RX_CLK, 57 + PD15_AOUT_FEC_COL, 58 + PD16_AIN_FEC_TX_ER, 59 + PF23_AIN_FEC_TX_EN, 60 + }; 61 + 62 + static struct imxuart_platform_data uart_pdata = { 63 + .flags = IMXUART_HAVE_RTSCTS, 64 + }; 65 + 66 + static struct platform_device *platform_devices[] __initdata = { 67 + &mxc_fec_device, 68 + }; 69 + 70 + static void __init mx27lite_init(void) 71 + { 72 + mxc_gpio_setup_multiple_pins(mx27lite_pins, ARRAY_SIZE(mx27lite_pins), 73 + "imx27lite"); 74 + mxc_register_device(&mxc_uart_device0, &uart_pdata); 75 + platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 76 + } 77 + 78 + static void __init mx27lite_timer_init(void) 79 + { 80 + mx27_clocks_init(26000000); 81 + } 82 + 83 + static struct sys_timer mx27lite_timer = { 84 + .init = mx27lite_timer_init, 85 + }; 86 + 87 + MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE") 88 + .phys_io = AIPI_BASE_ADDR, 89 + .io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, 90 + .boot_params = PHYS_OFFSET + 0x100, 91 + .map_io = mx27_map_io, 92 + .init_irq = mxc_init_irq, 93 + .init_machine = mx27lite_init, 94 + .timer = &mx27lite_timer, 95 + MACHINE_END
+1 -1
arch/arm/mach-mx2/mx27pdk.c
··· 88 88 .phys_io = AIPI_BASE_ADDR, 89 89 .io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, 90 90 .boot_params = PHYS_OFFSET + 0x100, 91 - .map_io = mxc_map_io, 91 + .map_io = mx27_map_io, 92 92 .init_irq = mxc_init_irq, 93 93 .init_machine = mx27pdk_init, 94 94 .timer = &mx27pdk_timer,
+21
arch/arm/mach-mx3/Kconfig
··· 57 57 Include support for mx31moboard platform. This includes specific 58 58 configurations for the board and its peripherals. 59 59 60 + config MACH_MX31LILLY 61 + bool "Support MX31 LILLY-1131 platforms (INCO startec)" 62 + select ARCH_MX31 63 + help 64 + Include support for mx31 based LILLY1131 modules. This includes 65 + specific configurations for the board and its peripherals. 66 + 60 67 config MACH_QONG 61 68 bool "Support Dave/DENX QongEVB-LITE platform" 62 69 select ARCH_MX31 ··· 78 71 Include support for Phytec pcm043 platform. This includes 79 72 specific configurations for the board and its peripherals. 80 73 74 + config MACH_ARMADILLO5X0 75 + bool "Support Atmark Armadillo-500 Development Base Board" 76 + select ARCH_MX31 77 + help 78 + Include support for Atmark Armadillo-500 platform. This includes 79 + specific configurations for the board and its peripherals. 80 + 81 + config MACH_MX35_3DS 82 + bool "Support MX35PDK platform" 83 + select ARCH_MX35 84 + default n 85 + help 86 + Include support for MX35PDK platform. This includes specific 87 + configurations for the board and its peripherals. 81 88 endif
+3
arch/arm/mach-mx3/Makefile
··· 8 8 obj-$(CONFIG_ARCH_MX31) += clock.o iomux.o 9 9 obj-$(CONFIG_ARCH_MX35) += clock-imx35.o 10 10 obj-$(CONFIG_MACH_MX31ADS) += mx31ads.o 11 + obj-$(CONFIG_MACH_MX31LILLY) += mx31lilly.o mx31lilly-db.o 11 12 obj-$(CONFIG_MACH_MX31LITE) += mx31lite.o 12 13 obj-$(CONFIG_MACH_PCM037) += pcm037.o 13 14 obj-$(CONFIG_MACH_MX31_3DS) += mx31pdk.o ··· 16 15 mx31moboard-marxbot.o 17 16 obj-$(CONFIG_MACH_QONG) += qong.o 18 17 obj-$(CONFIG_MACH_PCM043) += pcm043.o 18 + obj-$(CONFIG_MACH_ARMADILLO5X0) += armadillo5x0.o 19 + obj-$(CONFIG_MACH_MX35_3DS) += mx35pdk.o
+295
arch/arm/mach-mx3/armadillo5x0.c
··· 1 + /* 2 + * armadillo5x0.c 3 + * 4 + * Copyright 2009 Alberto Panizzo <maramaopercheseimorto@gmail.com> 5 + * updates in http://alberdroid.blogspot.com/ 6 + * 7 + * Based on Atmark Techno, Inc. armadillo 500 BSP 2008 8 + * Based on mx31ads.c and pcm037.c Great Work! 9 + * 10 + * This program is free software; you can redistribute it and/or modify 11 + * it under the terms of the GNU General Public License as published by 12 + * the Free Software Foundation; either version 2 of the License, or 13 + * (at your option) any later version. 14 + * 15 + * This program is distributed in the hope that it will be useful, 16 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 + * GNU General Public License for more details. 19 + * 20 + * You should have received a copy of the GNU General Public License 21 + * along with this program; if not, write to the Free Software 22 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 23 + * MA 02110-1301, USA. 24 + */ 25 + 26 + #include <linux/types.h> 27 + #include <linux/init.h> 28 + #include <linux/clk.h> 29 + #include <linux/platform_device.h> 30 + #include <linux/gpio.h> 31 + #include <linux/smsc911x.h> 32 + #include <linux/interrupt.h> 33 + #include <linux/irq.h> 34 + 35 + #include <mach/hardware.h> 36 + #include <asm/mach-types.h> 37 + #include <asm/mach/arch.h> 38 + #include <asm/mach/time.h> 39 + #include <asm/memory.h> 40 + #include <asm/mach/map.h> 41 + 42 + #include <mach/common.h> 43 + #include <mach/imx-uart.h> 44 + #include <mach/iomux-mx3.h> 45 + #include <mach/board-armadillo5x0.h> 46 + #include <mach/mmc.h> 47 + #include <mach/ipu.h> 48 + #include <mach/mx3fb.h> 49 + 50 + #include "devices.h" 51 + 52 + static int armadillo5x0_pins[] = { 53 + /* UART1 */ 54 + MX31_PIN_CTS1__CTS1, 55 + MX31_PIN_RTS1__RTS1, 56 + MX31_PIN_TXD1__TXD1, 57 + MX31_PIN_RXD1__RXD1, 58 + /* UART2 */ 59 + MX31_PIN_CTS2__CTS2, 60 + MX31_PIN_RTS2__RTS2, 61 + MX31_PIN_TXD2__TXD2, 62 + MX31_PIN_RXD2__RXD2, 63 + /* LAN9118_IRQ */ 64 + IOMUX_MODE(MX31_PIN_GPIO1_0, IOMUX_CONFIG_GPIO), 65 + /* SDHC1 */ 66 + MX31_PIN_SD1_DATA3__SD1_DATA3, 67 + MX31_PIN_SD1_DATA2__SD1_DATA2, 68 + MX31_PIN_SD1_DATA1__SD1_DATA1, 69 + MX31_PIN_SD1_DATA0__SD1_DATA0, 70 + MX31_PIN_SD1_CLK__SD1_CLK, 71 + MX31_PIN_SD1_CMD__SD1_CMD, 72 + /* Framebuffer */ 73 + MX31_PIN_LD0__LD0, 74 + MX31_PIN_LD1__LD1, 75 + MX31_PIN_LD2__LD2, 76 + MX31_PIN_LD3__LD3, 77 + MX31_PIN_LD4__LD4, 78 + MX31_PIN_LD5__LD5, 79 + MX31_PIN_LD6__LD6, 80 + MX31_PIN_LD7__LD7, 81 + MX31_PIN_LD8__LD8, 82 + MX31_PIN_LD9__LD9, 83 + MX31_PIN_LD10__LD10, 84 + MX31_PIN_LD11__LD11, 85 + MX31_PIN_LD12__LD12, 86 + MX31_PIN_LD13__LD13, 87 + MX31_PIN_LD14__LD14, 88 + MX31_PIN_LD15__LD15, 89 + MX31_PIN_LD16__LD16, 90 + MX31_PIN_LD17__LD17, 91 + MX31_PIN_VSYNC3__VSYNC3, 92 + MX31_PIN_HSYNC__HSYNC, 93 + MX31_PIN_FPSHIFT__FPSHIFT, 94 + MX31_PIN_DRDY0__DRDY0, 95 + IOMUX_MODE(MX31_PIN_LCS1, IOMUX_CONFIG_GPIO), /*ADV7125_PSAVE*/ 96 + 97 + }; 98 + 99 + /* 100 + * FB support 101 + */ 102 + static const struct fb_videomode fb_modedb[] = { 103 + { /* 640x480 @ 60 Hz */ 104 + .name = "CRT-VGA", 105 + .refresh = 60, 106 + .xres = 640, 107 + .yres = 480, 108 + .pixclock = 39721, 109 + .left_margin = 35, 110 + .right_margin = 115, 111 + .upper_margin = 43, 112 + .lower_margin = 1, 113 + .hsync_len = 10, 114 + .vsync_len = 1, 115 + .sync = FB_SYNC_OE_ACT_HIGH, 116 + .vmode = FB_VMODE_NONINTERLACED, 117 + .flag = 0, 118 + }, {/* 800x600 @ 56 Hz */ 119 + .name = "CRT-SVGA", 120 + .refresh = 56, 121 + .xres = 800, 122 + .yres = 600, 123 + .pixclock = 30000, 124 + .left_margin = 30, 125 + .right_margin = 108, 126 + .upper_margin = 13, 127 + .lower_margin = 10, 128 + .hsync_len = 10, 129 + .vsync_len = 1, 130 + .sync = FB_SYNC_OE_ACT_HIGH | FB_SYNC_HOR_HIGH_ACT | 131 + FB_SYNC_VERT_HIGH_ACT, 132 + .vmode = FB_VMODE_NONINTERLACED, 133 + .flag = 0, 134 + }, 135 + }; 136 + 137 + static struct ipu_platform_data mx3_ipu_data = { 138 + .irq_base = MXC_IPU_IRQ_START, 139 + }; 140 + 141 + static struct mx3fb_platform_data mx3fb_pdata = { 142 + .dma_dev = &mx3_ipu.dev, 143 + .name = "CRT-VGA", 144 + .mode = fb_modedb, 145 + .num_modes = ARRAY_SIZE(fb_modedb), 146 + }; 147 + 148 + /* 149 + * SDHC 1 150 + * MMC support 151 + */ 152 + static int armadillo5x0_sdhc1_get_ro(struct device *dev) 153 + { 154 + return gpio_get_value(IOMUX_TO_GPIO(MX31_PIN_ATA_RESET_B)); 155 + } 156 + 157 + static int armadillo5x0_sdhc1_init(struct device *dev, 158 + irq_handler_t detect_irq, void *data) 159 + { 160 + int ret; 161 + int gpio_det, gpio_wp; 162 + 163 + gpio_det = IOMUX_TO_GPIO(MX31_PIN_ATA_DMACK); 164 + gpio_wp = IOMUX_TO_GPIO(MX31_PIN_ATA_RESET_B); 165 + 166 + ret = gpio_request(gpio_det, "sdhc-card-detect"); 167 + if (ret) 168 + return ret; 169 + 170 + gpio_direction_input(gpio_det); 171 + 172 + ret = gpio_request(gpio_wp, "sdhc-write-protect"); 173 + if (ret) 174 + goto err_gpio_free; 175 + 176 + gpio_direction_input(gpio_wp); 177 + 178 + /* When supported the trigger type have to be BOTH */ 179 + ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_ATA_DMACK), detect_irq, 180 + IRQF_DISABLED | IRQF_TRIGGER_FALLING, 181 + "sdhc-detect", data); 182 + 183 + if (ret) 184 + goto err_gpio_free_2; 185 + 186 + return 0; 187 + 188 + err_gpio_free_2: 189 + gpio_free(gpio_wp); 190 + 191 + err_gpio_free: 192 + gpio_free(gpio_det); 193 + 194 + return ret; 195 + 196 + } 197 + 198 + static void armadillo5x0_sdhc1_exit(struct device *dev, void *data) 199 + { 200 + free_irq(IOMUX_TO_IRQ(MX31_PIN_ATA_DMACK), data); 201 + gpio_free(IOMUX_TO_GPIO(MX31_PIN_ATA_DMACK)); 202 + gpio_free(IOMUX_TO_GPIO(MX31_PIN_ATA_RESET_B)); 203 + } 204 + 205 + static struct imxmmc_platform_data sdhc_pdata = { 206 + .get_ro = armadillo5x0_sdhc1_get_ro, 207 + .init = armadillo5x0_sdhc1_init, 208 + .exit = armadillo5x0_sdhc1_exit, 209 + }; 210 + 211 + /* 212 + * SMSC 9118 213 + * Network support 214 + */ 215 + static struct resource armadillo5x0_smc911x_resources[] = { 216 + { 217 + .start = CS3_BASE_ADDR, 218 + .end = CS3_BASE_ADDR + SZ_32M - 1, 219 + .flags = IORESOURCE_MEM, 220 + }, { 221 + .start = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0), 222 + .end = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0), 223 + .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, 224 + }, 225 + }; 226 + 227 + static struct smsc911x_platform_config smsc911x_info = { 228 + .flags = SMSC911X_USE_32BIT, 229 + .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, 230 + .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, 231 + }; 232 + 233 + static struct platform_device armadillo5x0_smc911x_device = { 234 + .name = "smsc911x", 235 + .id = -1, 236 + .num_resources = ARRAY_SIZE(armadillo5x0_smc911x_resources), 237 + .resource = armadillo5x0_smc911x_resources, 238 + .dev = { 239 + .platform_data = &smsc911x_info, 240 + }, 241 + }; 242 + 243 + /* UART device data */ 244 + static struct imxuart_platform_data uart_pdata = { 245 + .flags = IMXUART_HAVE_RTSCTS, 246 + }; 247 + 248 + static struct platform_device *devices[] __initdata = { 249 + &armadillo5x0_smc911x_device, 250 + }; 251 + 252 + /* 253 + * Perform board specific initializations 254 + */ 255 + static void __init armadillo5x0_init(void) 256 + { 257 + mxc_iomux_setup_multiple_pins(armadillo5x0_pins, 258 + ARRAY_SIZE(armadillo5x0_pins), "armadillo5x0"); 259 + 260 + platform_add_devices(devices, ARRAY_SIZE(devices)); 261 + 262 + /* Register UART */ 263 + mxc_register_device(&mxc_uart_device0, &uart_pdata); 264 + mxc_register_device(&mxc_uart_device1, &uart_pdata); 265 + 266 + /* SMSC9118 IRQ pin */ 267 + gpio_direction_input(MX31_PIN_GPIO1_0); 268 + 269 + /* Register SDHC */ 270 + mxc_register_device(&mxcsdhc_device0, &sdhc_pdata); 271 + 272 + /* Register FB */ 273 + mxc_register_device(&mx3_ipu, &mx3_ipu_data); 274 + mxc_register_device(&mx3_fb, &mx3fb_pdata); 275 + } 276 + 277 + static void __init armadillo5x0_timer_init(void) 278 + { 279 + mx31_clocks_init(26000000); 280 + } 281 + 282 + static struct sys_timer armadillo5x0_timer = { 283 + .init = armadillo5x0_timer_init, 284 + }; 285 + 286 + MACHINE_START(ARMADILLO5X0, "Armadillo-500") 287 + /* Maintainer: Alberto Panizzo */ 288 + .phys_io = AIPS1_BASE_ADDR, 289 + .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, 290 + .boot_params = PHYS_OFFSET + 0x00000100, 291 + .map_io = mx31_map_io, 292 + .init_irq = mxc_init_irq, 293 + .timer = &armadillo5x0_timer, 294 + .init_machine = armadillo5x0_init, 295 + MACHINE_END
+8 -1
arch/arm/mach-mx3/clock.c
··· 483 483 DEFINE_CLOCK(mpeg4_clk, 0, MXC_CCM_CGR1, 0, NULL, NULL, &ahb_clk); 484 484 DEFINE_CLOCK(mstick1_clk, 0, MXC_CCM_CGR1, 2, mstick1_get_rate, NULL, &usb_pll_clk); 485 485 DEFINE_CLOCK(mstick2_clk, 1, MXC_CCM_CGR1, 4, mstick2_get_rate, NULL, &usb_pll_clk); 486 - DEFINE_CLOCK1(csi_clk, 0, MXC_CCM_CGR1, 6, csi, NULL, &ahb_clk); 486 + DEFINE_CLOCK1(csi_clk, 0, MXC_CCM_CGR1, 6, csi, NULL, &serial_pll_clk); 487 487 DEFINE_CLOCK(rtc_clk, 0, MXC_CCM_CGR1, 8, NULL, NULL, &ipg_clk); 488 488 DEFINE_CLOCK(wdog_clk, 0, MXC_CCM_CGR1, 10, NULL, NULL, &ipg_clk); 489 489 DEFINE_CLOCK(pwm_clk, 0, MXC_CCM_CGR1, 12, NULL, NULL, &perclk_clk); ··· 570 570 571 571 for (i = 0; i < ARRAY_SIZE(lookups); i++) 572 572 clkdev_add(&lookups[i]); 573 + 574 + /* change the csi_clk parent if necessary */ 575 + reg = __raw_readl(MXC_CCM_CCMR); 576 + if (!(reg & MXC_CCM_CCMR_CSCS)) 577 + if (clk_set_parent(&csi_clk, &usb_pll_clk)) 578 + pr_err("%s: error changing csi_clk parent\n", __func__); 579 + 573 580 574 581 /* Turn off all possible clocks */ 575 582 __raw_writel((3 << 4), MXC_CCM_CGR0);
+2
arch/arm/mach-mx3/devices.h
··· 16 16 extern struct platform_device mxcsdhc_device0; 17 17 extern struct platform_device mxcsdhc_device1; 18 18 extern struct platform_device mxc_otg_udc_device; 19 + extern struct platform_device mxc_rnga_device; 20 +
+216
arch/arm/mach-mx3/mx31lilly-db.c
··· 1 + /* 2 + * LILLY-1131 development board support 3 + * 4 + * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de> 5 + * 6 + * based on code for other MX31 boards, 7 + * 8 + * Copyright 2005-2007 Freescale Semiconductor 9 + * Copyright (c) 2009 Alberto Panizzo <maramaopercheseimorto@gmail.com> 10 + * Copyright (C) 2009 Valentin Longchamp, EPFL Mobots group 11 + * 12 + * This program is free software; you can redistribute it and/or modify 13 + * it under the terms of the GNU General Public License as published by 14 + * the Free Software Foundation; either version 2 of the License, or 15 + * (at your option) any later version. 16 + * 17 + * This program is distributed in the hope that it will be useful, 18 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 + * GNU General Public License for more details. 21 + * 22 + * You should have received a copy of the GNU General Public License 23 + * along with this program; if not, write to the Free Software 24 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 25 + */ 26 + 27 + #include <linux/kernel.h> 28 + #include <linux/types.h> 29 + #include <linux/init.h> 30 + #include <linux/gpio.h> 31 + #include <linux/platform_device.h> 32 + 33 + #include <asm/mach-types.h> 34 + #include <asm/mach/arch.h> 35 + #include <asm/mach/map.h> 36 + 37 + #include <mach/hardware.h> 38 + #include <mach/common.h> 39 + #include <mach/imx-uart.h> 40 + #include <mach/iomux-mx3.h> 41 + #include <mach/board-mx31lilly.h> 42 + #include <mach/mmc.h> 43 + #include <mach/mx3fb.h> 44 + #include <mach/ipu.h> 45 + 46 + #include "devices.h" 47 + 48 + /* 49 + * This file contains board-specific initialization routines for the 50 + * LILLY-1131 development board. If you design an own baseboard for the 51 + * module, use this file as base for support code. 52 + */ 53 + 54 + static unsigned int lilly_db_board_pins[] __initdata = { 55 + MX31_PIN_CTS1__CTS1, 56 + MX31_PIN_RTS1__RTS1, 57 + MX31_PIN_TXD1__TXD1, 58 + MX31_PIN_RXD1__RXD1, 59 + MX31_PIN_CTS2__CTS2, 60 + MX31_PIN_RTS2__RTS2, 61 + MX31_PIN_TXD2__TXD2, 62 + MX31_PIN_RXD2__RXD2, 63 + MX31_PIN_CSPI3_MOSI__RXD3, 64 + MX31_PIN_CSPI3_MISO__TXD3, 65 + MX31_PIN_CSPI3_SCLK__RTS3, 66 + MX31_PIN_CSPI3_SPI_RDY__CTS3, 67 + MX31_PIN_SD1_DATA3__SD1_DATA3, 68 + MX31_PIN_SD1_DATA2__SD1_DATA2, 69 + MX31_PIN_SD1_DATA1__SD1_DATA1, 70 + MX31_PIN_SD1_DATA0__SD1_DATA0, 71 + MX31_PIN_SD1_CLK__SD1_CLK, 72 + MX31_PIN_SD1_CMD__SD1_CMD, 73 + MX31_PIN_LD0__LD0, 74 + MX31_PIN_LD1__LD1, 75 + MX31_PIN_LD2__LD2, 76 + MX31_PIN_LD3__LD3, 77 + MX31_PIN_LD4__LD4, 78 + MX31_PIN_LD5__LD5, 79 + MX31_PIN_LD6__LD6, 80 + MX31_PIN_LD7__LD7, 81 + MX31_PIN_LD8__LD8, 82 + MX31_PIN_LD9__LD9, 83 + MX31_PIN_LD10__LD10, 84 + MX31_PIN_LD11__LD11, 85 + MX31_PIN_LD12__LD12, 86 + MX31_PIN_LD13__LD13, 87 + MX31_PIN_LD14__LD14, 88 + MX31_PIN_LD15__LD15, 89 + MX31_PIN_LD16__LD16, 90 + MX31_PIN_LD17__LD17, 91 + MX31_PIN_VSYNC3__VSYNC3, 92 + MX31_PIN_HSYNC__HSYNC, 93 + MX31_PIN_FPSHIFT__FPSHIFT, 94 + MX31_PIN_DRDY0__DRDY0, 95 + MX31_PIN_CONTRAST__CONTRAST, 96 + }; 97 + 98 + /* UART */ 99 + static struct imxuart_platform_data uart_pdata __initdata = { 100 + .flags = IMXUART_HAVE_RTSCTS, 101 + }; 102 + 103 + /* MMC support */ 104 + 105 + static int mxc_mmc1_get_ro(struct device *dev) 106 + { 107 + return gpio_get_value(IOMUX_TO_GPIO(MX31_PIN_LCS0)); 108 + } 109 + 110 + static int gpio_det, gpio_wp; 111 + 112 + static int mxc_mmc1_init(struct device *dev, 113 + irq_handler_t detect_irq, void *data) 114 + { 115 + int ret; 116 + 117 + gpio_det = IOMUX_TO_GPIO(MX31_PIN_GPIO1_1); 118 + gpio_wp = IOMUX_TO_GPIO(MX31_PIN_LCS0); 119 + 120 + ret = gpio_request(gpio_det, "MMC detect"); 121 + if (ret) 122 + return ret; 123 + 124 + ret = gpio_request(gpio_wp, "MMC w/p"); 125 + if (ret) 126 + goto exit_free_det; 127 + 128 + gpio_direction_input(gpio_det); 129 + gpio_direction_input(gpio_wp); 130 + 131 + ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO1_1), detect_irq, 132 + IRQF_DISABLED | IRQF_TRIGGER_FALLING, 133 + "MMC detect", data); 134 + if (ret) 135 + goto exit_free_wp; 136 + 137 + return 0; 138 + 139 + exit_free_wp: 140 + gpio_free(gpio_wp); 141 + 142 + exit_free_det: 143 + gpio_free(gpio_det); 144 + 145 + return ret; 146 + } 147 + 148 + static void mxc_mmc1_exit(struct device *dev, void *data) 149 + { 150 + gpio_free(gpio_det); 151 + gpio_free(gpio_wp); 152 + free_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO1_1), data); 153 + } 154 + 155 + static struct imxmmc_platform_data mmc_pdata = { 156 + .get_ro = mxc_mmc1_get_ro, 157 + .init = mxc_mmc1_init, 158 + .exit = mxc_mmc1_exit, 159 + }; 160 + 161 + /* Framebuffer support */ 162 + static struct ipu_platform_data ipu_data __initdata = { 163 + .irq_base = MXC_IPU_IRQ_START, 164 + }; 165 + 166 + static const struct fb_videomode fb_modedb = { 167 + /* 640x480 TFT panel (IPS-056T) */ 168 + .name = "CRT-VGA", 169 + .refresh = 64, 170 + .xres = 640, 171 + .yres = 480, 172 + .pixclock = 30000, 173 + .left_margin = 200, 174 + .right_margin = 2, 175 + .upper_margin = 2, 176 + .lower_margin = 2, 177 + .hsync_len = 3, 178 + .vsync_len = 1, 179 + .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_OE_ACT_HIGH, 180 + .vmode = FB_VMODE_NONINTERLACED, 181 + .flag = 0, 182 + }; 183 + 184 + static struct mx3fb_platform_data fb_pdata __initdata = { 185 + .dma_dev = &mx3_ipu.dev, 186 + .name = "CRT-VGA", 187 + .mode = &fb_modedb, 188 + .num_modes = 1, 189 + }; 190 + 191 + #define LCD_VCC_EN_GPIO (7) 192 + 193 + static void __init mx31lilly_init_fb(void) 194 + { 195 + if (gpio_request(LCD_VCC_EN_GPIO, "LCD enable") != 0) { 196 + printk(KERN_WARNING "unable to request LCD_VCC_EN pin.\n"); 197 + return; 198 + } 199 + 200 + mxc_register_device(&mx3_ipu, &ipu_data); 201 + mxc_register_device(&mx3_fb, &fb_pdata); 202 + gpio_direction_output(LCD_VCC_EN_GPIO, 1); 203 + } 204 + 205 + void __init mx31lilly_db_init(void) 206 + { 207 + mxc_iomux_setup_multiple_pins(lilly_db_board_pins, 208 + ARRAY_SIZE(lilly_db_board_pins), 209 + "development board pins"); 210 + mxc_register_device(&mxc_uart_device0, &uart_pdata); 211 + mxc_register_device(&mxc_uart_device1, &uart_pdata); 212 + mxc_register_device(&mxc_uart_device2, &uart_pdata); 213 + mxc_register_device(&mxcsdhc_device0, &mmc_pdata); 214 + mx31lilly_init_fb(); 215 + } 216 +
+155
arch/arm/mach-mx3/mx31lilly.c
··· 1 + /* 2 + * LILLY-1131 module support 3 + * 4 + * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de> 5 + * 6 + * based on code for other MX31 boards, 7 + * 8 + * Copyright 2005-2007 Freescale Semiconductor 9 + * Copyright (c) 2009 Alberto Panizzo <maramaopercheseimorto@gmail.com> 10 + * Copyright (C) 2009 Valentin Longchamp, EPFL Mobots group 11 + * 12 + * This program is free software; you can redistribute it and/or modify 13 + * it under the terms of the GNU General Public License as published by 14 + * the Free Software Foundation; either version 2 of the License, or 15 + * (at your option) any later version. 16 + * 17 + * This program is distributed in the hope that it will be useful, 18 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 + * GNU General Public License for more details. 21 + * 22 + * You should have received a copy of the GNU General Public License 23 + * along with this program; if not, write to the Free Software 24 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 25 + */ 26 + 27 + #include <linux/types.h> 28 + #include <linux/init.h> 29 + #include <linux/clk.h> 30 + #include <linux/platform_device.h> 31 + #include <linux/interrupt.h> 32 + #include <linux/smsc911x.h> 33 + #include <linux/mtd/physmap.h> 34 + 35 + #include <asm/mach-types.h> 36 + #include <asm/mach/arch.h> 37 + #include <asm/mach/time.h> 38 + #include <asm/mach/map.h> 39 + 40 + #include <mach/hardware.h> 41 + #include <mach/common.h> 42 + #include <mach/iomux-mx3.h> 43 + #include <mach/board-mx31lilly.h> 44 + 45 + #include "devices.h" 46 + 47 + /* 48 + * This file contains module-specific initialization routines for LILLY-1131. 49 + * Initialization of peripherals found on the baseboard is implemented in the 50 + * appropriate baseboard support code. 51 + */ 52 + 53 + /* SMSC ethernet support */ 54 + 55 + static struct resource smsc91x_resources[] = { 56 + { 57 + .start = CS4_BASE_ADDR, 58 + .end = CS4_BASE_ADDR + 0xffff, 59 + .flags = IORESOURCE_MEM, 60 + }, 61 + { 62 + .start = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0), 63 + .end = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0), 64 + .flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING, 65 + } 66 + }; 67 + 68 + static struct smsc911x_platform_config smsc911x_config = { 69 + .phy_interface = PHY_INTERFACE_MODE_MII, 70 + .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, 71 + .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, 72 + .flags = SMSC911X_USE_32BIT | 73 + SMSC911X_SAVE_MAC_ADDRESS | 74 + SMSC911X_FORCE_INTERNAL_PHY, 75 + }; 76 + 77 + static struct platform_device smsc91x_device = { 78 + .name = "smsc911x", 79 + .id = -1, 80 + .num_resources = ARRAY_SIZE(smsc91x_resources), 81 + .resource = smsc91x_resources, 82 + .dev = { 83 + .platform_data = &smsc911x_config, 84 + } 85 + }; 86 + 87 + /* NOR flash */ 88 + static struct physmap_flash_data nor_flash_data = { 89 + .width = 2, 90 + }; 91 + 92 + static struct resource nor_flash_resource = { 93 + .start = 0xa0000000, 94 + .end = 0xa1ffffff, 95 + .flags = IORESOURCE_MEM, 96 + }; 97 + 98 + static struct platform_device physmap_flash_device = { 99 + .name = "physmap-flash", 100 + .id = 0, 101 + .dev = { 102 + .platform_data = &nor_flash_data, 103 + }, 104 + .resource = &nor_flash_resource, 105 + .num_resources = 1, 106 + }; 107 + 108 + static struct platform_device *devices[] __initdata = { 109 + &smsc91x_device, 110 + &physmap_flash_device, 111 + &mxc_i2c_device1, 112 + }; 113 + 114 + static int mx31lilly_baseboard; 115 + core_param(mx31lilly_baseboard, mx31lilly_baseboard, int, 0444); 116 + 117 + static void __init mx31lilly_board_init(void) 118 + { 119 + switch (mx31lilly_baseboard) { 120 + case MX31LILLY_NOBOARD: 121 + break; 122 + case MX31LILLY_DB: 123 + mx31lilly_db_init(); 124 + break; 125 + default: 126 + printk(KERN_ERR "Illegal mx31lilly_baseboard type %d\n", 127 + mx31lilly_baseboard); 128 + } 129 + 130 + mxc_iomux_alloc_pin(MX31_PIN_CS4__CS4, "Ethernet CS"); 131 + mxc_iomux_alloc_pin(MX31_PIN_CSPI2_MOSI__SCL, "I2C SCL"); 132 + mxc_iomux_alloc_pin(MX31_PIN_CSPI2_MISO__SDA, "I2C SDA"); 133 + 134 + platform_add_devices(devices, ARRAY_SIZE(devices)); 135 + } 136 + 137 + static void __init mx31lilly_timer_init(void) 138 + { 139 + mx31_clocks_init(26000000); 140 + } 141 + 142 + static struct sys_timer mx31lilly_timer = { 143 + .init = mx31lilly_timer_init, 144 + }; 145 + 146 + MACHINE_START(LILLY1131, "INCO startec LILLY-1131") 147 + .phys_io = AIPS1_BASE_ADDR, 148 + .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, 149 + .boot_params = PHYS_OFFSET + 0x100, 150 + .map_io = mx31_map_io, 151 + .init_irq = mxc_init_irq, 152 + .init_machine = mx31lilly_board_init, 153 + .timer = &mx31lilly_timer, 154 + MACHINE_END 155 +
+37 -1
arch/arm/mach-mx3/mx31pdk.c
··· 21 21 #include <linux/clk.h> 22 22 #include <linux/irq.h> 23 23 #include <linux/gpio.h> 24 + #include <linux/smsc911x.h> 25 + #include <linux/platform_device.h> 24 26 25 27 #include <mach/hardware.h> 26 28 #include <asm/mach-types.h> ··· 55 53 56 54 static struct imxuart_platform_data uart_pdata = { 57 55 .flags = IMXUART_HAVE_RTSCTS, 56 + }; 57 + 58 + /* 59 + * Support for the SMSC9217 on the Debug board. 60 + */ 61 + 62 + static struct smsc911x_platform_config smsc911x_config = { 63 + .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, 64 + .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, 65 + .flags = SMSC911X_USE_16BIT | SMSC911X_FORCE_INTERNAL_PHY, 66 + .phy_interface = PHY_INTERFACE_MODE_MII, 67 + }; 68 + 69 + static struct resource smsc911x_resources[] = { 70 + { 71 + .start = LAN9217_BASE_ADDR, 72 + .end = LAN9217_BASE_ADDR + 0xff, 73 + .flags = IORESOURCE_MEM, 74 + }, { 75 + .start = EXPIO_INT_ENET, 76 + .end = EXPIO_INT_ENET, 77 + .flags = IORESOURCE_IRQ, 78 + }, 79 + }; 80 + 81 + static struct platform_device smsc911x_device = { 82 + .name = "smsc911x", 83 + .id = -1, 84 + .num_resources = ARRAY_SIZE(smsc911x_resources), 85 + .resource = smsc911x_resources, 86 + .dev = { 87 + .platform_data = &smsc911x_config, 88 + }, 58 89 }; 59 90 60 91 /* ··· 242 207 243 208 mxc_register_device(&mxc_uart_device0, &uart_pdata); 244 209 245 - mx31pdk_init_expio(); 210 + if (!mx31pdk_init_expio()) 211 + platform_device_register(&smsc911x_device); 246 212 } 247 213 248 214 static void __init mx31pdk_timer_init(void)
+104
arch/arm/mach-mx3/mx35pdk.c
··· 1 + /* 2 + * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved. 3 + * 4 + * Author: Fabio Estevam <fabio.estevam@freescale.com> 5 + * 6 + * This program is free software; you can redistribute it and/or modify 7 + * it under the terms of the GNU General Public License as published by 8 + * the Free Software Foundation; either version 2 of the License, or 9 + * (at your option) any later version. 10 + * 11 + * This program is distributed in the hope that it will be useful, 12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + * GNU General Public License for more details. 15 + * 16 + * You should have received a copy of the GNU General Public License 17 + * along with this program; if not, write to the Free Software 18 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 + */ 20 + 21 + #include <linux/types.h> 22 + #include <linux/init.h> 23 + #include <linux/platform_device.h> 24 + #include <linux/memory.h> 25 + #include <linux/gpio.h> 26 + 27 + #include <asm/mach-types.h> 28 + #include <asm/mach/arch.h> 29 + #include <asm/mach/time.h> 30 + #include <asm/mach/map.h> 31 + 32 + #include <mach/hardware.h> 33 + #include <mach/common.h> 34 + #include <mach/imx-uart.h> 35 + #include <mach/iomux-mx35.h> 36 + 37 + #include "devices.h" 38 + 39 + static struct imxuart_platform_data uart_pdata = { 40 + .flags = IMXUART_HAVE_RTSCTS, 41 + }; 42 + 43 + static struct platform_device *devices[] __initdata = { 44 + &mxc_fec_device, 45 + }; 46 + 47 + static struct pad_desc mx35pdk_pads[] = { 48 + /* UART1 */ 49 + MX35_PAD_CTS1__UART1_CTS, 50 + MX35_PAD_RTS1__UART1_RTS, 51 + MX35_PAD_TXD1__UART1_TXD_MUX, 52 + MX35_PAD_RXD1__UART1_RXD_MUX, 53 + /* FEC */ 54 + MX35_PAD_FEC_TX_CLK__FEC_TX_CLK, 55 + MX35_PAD_FEC_RX_CLK__FEC_RX_CLK, 56 + MX35_PAD_FEC_RX_DV__FEC_RX_DV, 57 + MX35_PAD_FEC_COL__FEC_COL, 58 + MX35_PAD_FEC_RDATA0__FEC_RDATA_0, 59 + MX35_PAD_FEC_TDATA0__FEC_TDATA_0, 60 + MX35_PAD_FEC_TX_EN__FEC_TX_EN, 61 + MX35_PAD_FEC_MDC__FEC_MDC, 62 + MX35_PAD_FEC_MDIO__FEC_MDIO, 63 + MX35_PAD_FEC_TX_ERR__FEC_TX_ERR, 64 + MX35_PAD_FEC_RX_ERR__FEC_RX_ERR, 65 + MX35_PAD_FEC_CRS__FEC_CRS, 66 + MX35_PAD_FEC_RDATA1__FEC_RDATA_1, 67 + MX35_PAD_FEC_TDATA1__FEC_TDATA_1, 68 + MX35_PAD_FEC_RDATA2__FEC_RDATA_2, 69 + MX35_PAD_FEC_TDATA2__FEC_TDATA_2, 70 + MX35_PAD_FEC_RDATA3__FEC_RDATA_3, 71 + MX35_PAD_FEC_TDATA3__FEC_TDATA_3, 72 + }; 73 + 74 + /* 75 + * Board specific initialization. 76 + */ 77 + static void __init mxc_board_init(void) 78 + { 79 + mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads)); 80 + 81 + platform_add_devices(devices, ARRAY_SIZE(devices)); 82 + 83 + mxc_register_device(&mxc_uart_device0, &uart_pdata); 84 + } 85 + 86 + static void __init mx35pdk_timer_init(void) 87 + { 88 + mx35_clocks_init(); 89 + } 90 + 91 + struct sys_timer mx35pdk_timer = { 92 + .init = mx35pdk_timer_init, 93 + }; 94 + 95 + MACHINE_START(MX35_3DS, "Freescale MX35PDK") 96 + /* Maintainer: Freescale Semiconductor, Inc */ 97 + .phys_io = AIPS1_BASE_ADDR, 98 + .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, 99 + .boot_params = PHYS_OFFSET + 0x100, 100 + .map_io = mx35_map_io, 101 + .init_irq = mxc_init_irq, 102 + .init_machine = mxc_board_init, 103 + .timer = &mx35pdk_timer, 104 + MACHINE_END
+22
arch/arm/plat-mxc/include/mach/board-armadillo5x0.h
··· 1 + /* 2 + * Copyright 2009 Alberto Panizzo <maramaopercheseimorto@gmail.com>. 3 + * All Rights Reserved. 4 + */ 5 + 6 + /* 7 + * This program is free software; you can redistribute it and/or modify 8 + * it under the terms of the GNU General Public License version 2 as 9 + * published by the Free Software Foundation. 10 + */ 11 + 12 + #ifndef __ASM_ARCH_MXC_BOARD_ARMADILLO5X0_H__ 13 + #define __ASM_ARCH_MXC_BOARD_ARMADILLO5X0_H__ 14 + 15 + #include <mach/hardware.h> 16 + 17 + /* mandatory for CONFIG_DEBUG_LL */ 18 + 19 + #define MXC_LL_UART_PADDR UART1_BASE_ADDR 20 + #define MXC_LL_UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR) 21 + 22 + #endif
+19
arch/arm/plat-mxc/include/mach/board-mx27lite.h
··· 1 + /* 2 + * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved. 3 + */ 4 + 5 + /* 6 + * This program is free software; you can redistribute it and/or modify 7 + * it under the terms of the GNU General Public License version 2 as 8 + * published by the Free Software Foundation. 9 + */ 10 + 11 + #ifndef __ASM_ARCH_MXC_BOARD_MX27LITE_H__ 12 + #define __ASM_ARCH_MXC_BOARD_MX27LITE_H__ 13 + 14 + /* mandatory for CONFIG_DEBUG_LL */ 15 + 16 + #define MXC_LL_UART_PADDR UART1_BASE_ADDR 17 + #define MXC_LL_UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR) 18 + 19 + #endif /* __ASM_ARCH_MXC_BOARD_MX27LITE_H__ */
+46
arch/arm/plat-mxc/include/mach/board-mx31lilly.h
··· 1 + /* 2 + * Copyright (C) 2009 Daniel Mack <daniel@caiaq.de> 3 + * 4 + * Based on code for mobots boards, 5 + * Copyright (C) 2009 Valentin Longchamp, EPFL Mobots group 6 + * 7 + * This program is free software; you can redistribute it and/or 8 + * modify it under the terms of the GNU General Public License 9 + * as published by the Free Software Foundation; either version 2 10 + * of the License, or (at your option) any later version. 11 + * This program is distributed in the hope that it will be useful, 12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + * GNU General Public License for more details. 15 + * 16 + * You should have received a copy of the GNU General Public License 17 + * along with this program; if not, write to the Free Software 18 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 + * MA 02110-1301, USA. 20 + */ 21 + 22 + #ifndef __ASM_ARCH_MXC_BOARD_MX31LILLY_H__ 23 + #define __ASM_ARCH_MXC_BOARD_MX31LILLY_H__ 24 + 25 + /* mandatory for CONFIG_LL_DEBUG */ 26 + 27 + #define MXC_LL_UART_PADDR UART1_BASE_ADDR 28 + #define MXC_LL_UART_VADDR (AIPI_BASE_ADDR_VIRT + 0x0A000) 29 + 30 + #ifndef __ASSEMBLY__ 31 + 32 + enum mx31lilly_boards { 33 + MX31LILLY_NOBOARD = 0, 34 + MX31LILLY_DB = 1, 35 + }; 36 + 37 + /* 38 + * This CPU module needs a baseboard to work. After basic initializing 39 + * its own devices, it calls baseboard's init function. 40 + */ 41 + 42 + extern void mx31lilly_db_init(void); 43 + 44 + #endif 45 + 46 + #endif /* __ASM_ARCH_MXC_BOARD_MX31LILLY_H__ */
+27
arch/arm/plat-mxc/include/mach/board-mx35pdk.h
··· 1 + /* 2 + * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved 3 + * 4 + * This program is free software; you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License as published by 6 + * the Free Software Foundation; either version 2 of the License, or 7 + * (at your option) any later version. 8 + * 9 + * This program is distributed in the hope that it will be useful, 10 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 + * GNU General Public License for more details. 13 + * 14 + * You should have received a copy of the GNU General Public License 15 + * along with this program; if not, write to the Free Software 16 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 + */ 18 + 19 + #ifndef __ASM_ARCH_MXC_BOARD_MX35PDK_H__ 20 + #define __ASM_ARCH_MXC_BOARD_MX35PDK_H__ 21 + 22 + /* mandatory for CONFIG_DEBUG_LL */ 23 + 24 + #define MXC_LL_UART_PADDR UART1_BASE_ADDR 25 + #define MXC_LL_UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR) 26 + 27 + #endif /* __ASM_ARCH_MXC_BOARD_MX35PDK_H__ */
+9
arch/arm/plat-mxc/include/mach/debug-macro.S
··· 43 43 #ifdef CONFIG_MACH_MX27_3DS 44 44 #include <mach/board-mx27pdk.h> 45 45 #endif 46 + #ifdef CONFIG_MACH_ARMADILLO5X0 47 + #include <mach/board-armadillo5x0.h> 48 + #endif 49 + #ifdef CONFIG_MACH_MX35_3DS 50 + #include <mach/board-mx35pdk.h> 51 + #endif 52 + #ifdef CONFIG_MACH_MX27LITE 53 + #include <mach/board-mx27lite.h> 54 + #endif 46 55 .macro addruart,rx 47 56 mrc p15, 0, \rx, c1, c0 48 57 tst \rx, #1 @ MMU enabled?
+2
drivers/serial/imx.c
··· 1024 1024 if (co->index == -1 || co->index >= ARRAY_SIZE(imx_ports)) 1025 1025 co->index = 0; 1026 1026 sport = imx_ports[co->index]; 1027 + if(sport == NULL) 1028 + return -ENODEV; 1027 1029 1028 1030 if (options) 1029 1031 uart_parse_options(options, &baud, &parity, &bits, &flow);