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

Merge tag 'imx-cleanup-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/cleanup

Pull "i.MX cleanup for 4.9" from Shawn Guo:

- Drop i.MX1 board files and make i.MX1 a DT only platform.
- Remove obsolete ENET initialization code for TX28 board, since FEC
driver handles those setup well now.
- A couple of cleanups on i.MX31 IOMUX headers to drop duplications
- A few other random and trivial cleanups

* tag 'imx-cleanup-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
ARM: imx: (trivial) fix typo and grammar
ARM: imx: use IS_ENABLED() instead of checking for built-in or module
ARM: imx: remove platform-mxc_rnga
ARM: imx: no need to select SMP_ON_UP explicitly
ARM: i.MX: Move SOC_IMX1 into 'Device tree only'
ARM: i.MX: Remove i.MX1 non-DT support
ARM: i.MX: Remove i.MX1 Synertronixx SCB9328 board support
ARM: i.MX: Remove i.MX1 Armadeus APF9328 board support
ARM: mxs: remove obsolete startup code for TX28
ARM: i.MX31 iomux: remove duplicates with alternate name
ARM: i.MX31 iomux: remove plain duplicates

+46 -998
+1 -2
arch/arm/configs/imx_v4_v5_defconfig
··· 22 22 CONFIG_ARCH_MULTI_V5=y 23 23 # CONFIG_ARCH_MULTI_V7 is not set 24 24 CONFIG_ARCH_MXC=y 25 - CONFIG_MACH_SCB9328=y 26 - CONFIG_MACH_APF9328=y 27 25 CONFIG_MACH_MX21ADS=y 28 26 CONFIG_MACH_MX27ADS=y 29 27 CONFIG_MACH_MX27_3DS=y 30 28 CONFIG_MACH_IMX27_VISSTRIM_M10=y 31 29 CONFIG_MACH_PCA100=y 32 30 CONFIG_MACH_IMX27_DT=y 31 + CONFIG_SOC_IMX1=y 33 32 CONFIG_SOC_IMX25=y 34 33 CONFIG_PREEMPT=y 35 34 CONFIG_AEABI=y
+1 -3
arch/arm/configs/multi_v4t_defconfig
··· 20 20 CONFIG_INTEGRATOR_CM920T=y 21 21 CONFIG_INTEGRATOR_CM922T_XA10=y 22 22 CONFIG_ARCH_MXC=y 23 - CONFIG_MACH_SCB9328=y 24 - CONFIG_MACH_APF9328=y 25 - CONFIG_MACH_IMX1_DT=y 23 + CONFIG_SOC_IMX1=y 26 24 CONFIG_ARCH_NSPIRE=y 27 25 CONFIG_AEABI=y 28 26 # CONFIG_ATAGS is not set
+12 -38
arch/arm/mach-imx/Kconfig
··· 64 64 config ARCH_MXC_IOMUX_V3 65 65 bool 66 66 67 - config SOC_IMX1 68 - bool 69 - select CPU_ARM920T 70 - select IMX_HAVE_IOMUX_V1 71 - select MXC_AVIC 72 - select PINCTRL_IMX1 73 - 74 67 config SOC_IMX21 75 68 bool 76 69 select CPU_ARM926T ··· 81 88 bool 82 89 select CPU_V6 83 90 select MXC_AVIC 84 - select SMP_ON_UP if SMP 85 91 86 92 config SOC_IMX35 87 93 bool ··· 88 96 select HAVE_EPIT 89 97 select MXC_AVIC 90 98 select PINCTRL_IMX35 91 - select SMP_ON_UP if SMP 92 - 93 - if ARCH_MULTI_V4T 94 - 95 - comment "MX1 platforms:" 96 - 97 - config MACH_SCB9328 98 - bool "Synertronixx scb9328" 99 - select IMX_HAVE_PLATFORM_IMX_UART 100 - select SOC_IMX1 101 - help 102 - Say Y here if you are using a Synertronixx scb9328 board 103 - 104 - config MACH_APF9328 105 - bool "APF9328" 106 - select IMX_HAVE_PLATFORM_IMX_I2C 107 - select IMX_HAVE_PLATFORM_IMX_UART 108 - select SOC_IMX1 109 - help 110 - Say Yes here if you are using the Armadeus APF9328 development board 111 - 112 - config MACH_IMX1_DT 113 - bool "Support i.MX1 platforms from device tree" 114 - select SOC_IMX1 115 - help 116 - Include support for Freescale i.MX1 based platforms 117 - using the device tree for discovery. 118 - 119 - endif 120 99 121 100 if ARCH_MULTI_V5 122 101 ··· 424 461 425 462 comment "Device tree only" 426 463 464 + if ARCH_MULTI_V4T 465 + 466 + config SOC_IMX1 467 + bool "i.MX1 support" 468 + select CPU_ARM920T 469 + select MXC_AVIC 470 + select PINCTRL_IMX1 471 + help 472 + This enables support for Freescale i.MX1 processor 473 + 474 + endif 475 + 427 476 if ARCH_MULTI_V5 428 477 429 478 config SOC_IMX25 ··· 560 585 select ARM_GIC if ARCH_MULTI_V7 561 586 select PINCTRL_VF610 562 587 select PL310_ERRATA_769419 if CACHE_L2X0 563 - select SMP_ON_UP if SMP 564 588 565 589 help 566 590 This enables support for Freescale Vybrid VF610 processor.
+1 -6
arch/arm/mach-imx/Makefile
··· 1 1 obj-y := cpu.o system.o irq-common.o 2 2 3 - obj-$(CONFIG_SOC_IMX1) += mm-imx1.o 4 3 obj-$(CONFIG_SOC_IMX21) += mm-imx21.o 5 4 6 5 obj-$(CONFIG_SOC_IMX25) += cpu-imx25.o mach-imx25.o pm-imx25.o ··· 33 34 obj-y += ssi-fiq.o 34 35 obj-y += ssi-fiq-ksym.o 35 36 endif 36 - 37 - # i.MX1 based machines 38 - obj-$(CONFIG_MACH_SCB9328) += mach-scb9328.o 39 - obj-$(CONFIG_MACH_APF9328) += mach-apf9328.o 40 - obj-$(CONFIG_MACH_IMX1_DT) += imx1-dt.o 41 37 42 38 # i.MX21 based machines 43 39 obj-$(CONFIG_MACH_MX21ADS) += mach-mx21ads.o ··· 87 93 endif 88 94 obj-$(CONFIG_SOC_IMX6) += pm-imx6.o 89 95 96 + obj-$(CONFIG_SOC_IMX1) += mach-imx1.o 90 97 obj-$(CONFIG_SOC_IMX50) += mach-imx50.o 91 98 obj-$(CONFIG_SOC_IMX51) += mach-imx51.o 92 99 obj-$(CONFIG_SOC_IMX53) += mach-imx53.o
-5
arch/arm/mach-imx/common.h
··· 21 21 enum mxc_cpu_pwr_mode; 22 22 struct of_device_id; 23 23 24 - void mx1_map_io(void); 25 24 void mx21_map_io(void); 26 25 void mx27_map_io(void); 27 26 void mx31_map_io(void); 28 27 void mx35_map_io(void); 29 - void imx1_init_early(void); 30 28 void imx21_init_early(void); 31 29 void imx27_init_early(void); 32 30 void imx31_init_early(void); 33 31 void imx35_init_early(void); 34 32 void mxc_init_irq(void __iomem *); 35 - void mx1_init_irq(void); 36 33 void mx21_init_irq(void); 37 34 void mx27_init_irq(void); 38 35 void mx31_init_irq(void); 39 36 void mx35_init_irq(void); 40 - void imx1_soc_init(void); 41 37 void imx21_soc_init(void); 42 38 void imx27_soc_init(void); 43 39 void imx31_soc_init(void); 44 40 void imx35_soc_init(void); 45 41 void epit_timer_init(void __iomem *base, int irq); 46 - int mx1_clocks_init(unsigned long fref); 47 42 int mx21_clocks_init(unsigned long lref, unsigned long fref); 48 43 int mx27_clocks_init(unsigned long fref); 49 44 int mx31_clocks_init(unsigned long fref);
-30
arch/arm/mach-imx/devices-imx1.h
··· 1 - /* 2 - * Copyright (C) 2010 Pengutronix 3 - * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> 4 - * 5 - * This program is free software; you can redistribute it and/or modify it under 6 - * the terms of the GNU General Public License version 2 as published by the 7 - * Free Software Foundation. 8 - */ 9 - #include "devices/devices-common.h" 10 - 11 - extern const struct imx_imx_fb_data imx1_imx_fb_data; 12 - #define imx1_add_imx_fb(pdata) \ 13 - imx_add_imx_fb(&imx1_imx_fb_data, pdata) 14 - 15 - extern const struct imx_imx_i2c_data imx1_imx_i2c_data; 16 - #define imx1_add_imx_i2c(pdata) \ 17 - imx_add_imx_i2c(&imx1_imx_i2c_data, pdata) 18 - 19 - extern const struct imx_imx_uart_3irq_data imx1_imx_uart_data[]; 20 - #define imx1_add_imx_uart(id, pdata) \ 21 - imx_add_imx_uart_3irq(&imx1_imx_uart_data[id], pdata) 22 - #define imx1_add_imx_uart0(pdata) imx1_add_imx_uart(0, pdata) 23 - #define imx1_add_imx_uart1(pdata) imx1_add_imx_uart(1, pdata) 24 - 25 - extern const struct imx_spi_imx_data imx1_cspi_data[]; 26 - #define imx1_add_cspi(id, pdata) \ 27 - imx_add_spi_imx(&imx1_cspi_data[id], pdata) 28 - 29 - #define imx1_add_spi_imx0(pdata) imx1_add_cspi(0, pdata) 30 - #define imx1_add_spi_imx1(pdata) imx1_add_cspi(1, pdata)
-1
arch/arm/mach-imx/devices/Makefile
··· 20 20 obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_EHCI) += platform-mxc-ehci.o 21 21 obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_MMC) += platform-mxc-mmc.o 22 22 obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_NAND) += platform-mxc_nand.o 23 - obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_RNGA) += platform-mxc_rnga.o 24 23 obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_RTC) += platform-mxc_rtc.o 25 24 obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_W1) += platform-mxc_w1.o 26 25 obj-$(CONFIG_IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX) += platform-sdhci-esdhc-imx.o
-12
arch/arm/mach-imx/devices/devices-common.h
··· 154 154 const struct imx_ssi_platform_data *pdata); 155 155 156 156 #include <linux/platform_data/serial-imx.h> 157 - struct imx_imx_uart_3irq_data { 158 - int id; 159 - resource_size_t iobase; 160 - resource_size_t iosize; 161 - resource_size_t irqrx; 162 - resource_size_t irqtx; 163 - resource_size_t irqrts; 164 - }; 165 - struct platform_device *__init imx_add_imx_uart_3irq( 166 - const struct imx_imx_uart_3irq_data *data, 167 - const struct imxuart_platform_data *pdata); 168 - 169 157 struct imx_imx_uart_1irq_data { 170 158 int id; 171 159 resource_size_t iobase;
-5
arch/arm/mach-imx/devices/platform-imx-fb.c
··· 19 19 .irq = soc ## _INT_LCDC, \ 20 20 } 21 21 22 - #ifdef CONFIG_SOC_IMX1 23 - const struct imx_imx_fb_data imx1_imx_fb_data __initconst = 24 - imx_imx_fb_data_entry_single(MX1, "imx1-fb", SZ_4K); 25 - #endif /* ifdef CONFIG_SOC_IMX1 */ 26 - 27 22 #ifdef CONFIG_SOC_IMX21 28 23 const struct imx_imx_fb_data imx21_imx_fb_data __initconst = 29 24 imx_imx_fb_data_entry_single(MX21, "imx21-fb", SZ_4K);
-5
arch/arm/mach-imx/devices/platform-imx-i2c.c
··· 21 21 #define imx_imx_i2c_data_entry(soc, _devid, _id, _hwid, _size) \ 22 22 [_id] = imx_imx_i2c_data_entry_single(soc, _devid, _id, _hwid, _size) 23 23 24 - #ifdef CONFIG_SOC_IMX1 25 - const struct imx_imx_i2c_data imx1_imx_i2c_data __initconst = 26 - imx_imx_i2c_data_entry_single(MX1, "imx1-i2c", 0, , SZ_4K); 27 - #endif /* ifdef CONFIG_SOC_IMX1 */ 28 - 29 24 #ifdef CONFIG_SOC_IMX21 30 25 const struct imx_imx_i2c_data imx21_imx_i2c_data __initconst = 31 26 imx_imx_i2c_data_entry_single(MX21, "imx21-i2c", 0, , SZ_4K);
-37
arch/arm/mach-imx/devices/platform-imx-uart.c
··· 27 27 .irq = soc ## _INT_UART ## _hwid, \ 28 28 } 29 29 30 - #ifdef CONFIG_SOC_IMX1 31 - const struct imx_imx_uart_3irq_data imx1_imx_uart_data[] __initconst = { 32 - #define imx1_imx_uart_data_entry(_id, _hwid) \ 33 - imx_imx_uart_3irq_data_entry(MX1, _id, _hwid, 0xd0) 34 - imx1_imx_uart_data_entry(0, 1), 35 - imx1_imx_uart_data_entry(1, 2), 36 - }; 37 - #endif /* ifdef CONFIG_SOC_IMX1 */ 38 - 39 30 #ifdef CONFIG_SOC_IMX21 40 31 const struct imx_imx_uart_1irq_data imx21_imx_uart_data[] __initconst = { 41 32 #define imx21_imx_uart_data_entry(_id, _hwid) \ ··· 72 81 imx35_imx_uart_data_entry(2, 3), 73 82 }; 74 83 #endif /* ifdef CONFIG_SOC_IMX35 */ 75 - 76 - struct platform_device *__init imx_add_imx_uart_3irq( 77 - const struct imx_imx_uart_3irq_data *data, 78 - const struct imxuart_platform_data *pdata) 79 - { 80 - struct resource res[] = { 81 - { 82 - .start = data->iobase, 83 - .end = data->iobase + data->iosize - 1, 84 - .flags = IORESOURCE_MEM, 85 - }, { 86 - .start = data->irqrx, 87 - .end = data->irqrx, 88 - .flags = IORESOURCE_IRQ, 89 - }, { 90 - .start = data->irqtx, 91 - .end = data->irqtx, 92 - .flags = IORESOURCE_IRQ, 93 - }, { 94 - .start = data->irqrts, 95 - .end = data->irqrx, 96 - .flags = IORESOURCE_IRQ, 97 - }, 98 - }; 99 - 100 - return imx_add_platform_device("imx1-uart", data->id, res, 101 - ARRAY_SIZE(res), pdata, sizeof(*pdata)); 102 - } 103 84 104 85 struct platform_device *__init imx_add_imx_uart_1irq( 105 86 const struct imx_imx_uart_1irq_data *data,
-9
arch/arm/mach-imx/devices/platform-spi_imx.c
··· 21 21 #define imx_spi_imx_data_entry(soc, type, devid, id, hwid, size) \ 22 22 [id] = imx_spi_imx_data_entry_single(soc, type, devid, id, hwid, size) 23 23 24 - #ifdef CONFIG_SOC_IMX1 25 - const struct imx_spi_imx_data imx1_cspi_data[] __initconst = { 26 - #define imx1_cspi_data_entry(_id, _hwid) \ 27 - imx_spi_imx_data_entry(MX1, CSPI, "imx1-cspi", _id, _hwid, SZ_4K) 28 - imx1_cspi_data_entry(0, 1), 29 - imx1_cspi_data_entry(1, 2), 30 - }; 31 - #endif 32 - 33 24 #ifdef CONFIG_SOC_IMX21 34 25 const struct imx_spi_imx_data imx21_cspi_data[] __initconst = { 35 26 #define imx21_cspi_data_entry(_id, _hwid) \
+1 -2
arch/arm/mach-imx/hardware.h
··· 112 112 #include "mx2x.h" 113 113 #include "mx21.h" 114 114 #include "mx27.h" 115 - #include "mx1.h" 116 115 117 116 #define imx_map_entry(soc, name, _type) { \ 118 117 .virtual = soc ## _IO_P2V(soc ## _ ## name ## _BASE_ADDR), \ ··· 120 121 .type = _type, \ 121 122 } 122 123 123 - /* There's a off-by-one betweem the gpio bank number and the gpiochip */ 124 + /* There's an off-by-one between the gpio bank number and the gpiochip */ 124 125 /* range e.g. GPIO_1_5 is gpio 5 under linux */ 125 126 #define IMX_GPIO_NR(bank, nr) (((bank) - 1) * 32 + (nr)) 126 127
+21 -2
arch/arm/mach-imx/imx1-dt.c arch/arm/mach-imx/mach-imx1.c
··· 9 9 10 10 #include <linux/of_platform.h> 11 11 #include <asm/mach/arch.h> 12 + #include <asm/mach/map.h> 12 13 13 14 #include "common.h" 15 + #include "hardware.h" 16 + 17 + #define MX1_AVIC_ADDR 0x00223000 18 + 19 + static void __init imx1_init_early(void) 20 + { 21 + mxc_set_cpu_type(MXC_CPU_MX1); 22 + } 23 + 24 + static void __init imx1_init_irq(void) 25 + { 26 + void __iomem *avic_addr; 27 + 28 + avic_addr = ioremap(MX1_AVIC_ADDR, SZ_4K); 29 + WARN_ON(!avic_addr); 30 + 31 + mxc_init_irq(avic_addr); 32 + } 14 33 15 34 static const char * const imx1_dt_board_compat[] __initconst = { 16 35 "fsl,imx1", ··· 37 18 }; 38 19 39 20 DT_MACHINE_START(IMX1_DT, "Freescale i.MX1 (Device Tree Support)") 40 - .map_io = mx1_map_io, 21 + .map_io = debug_ll_io_init, 41 22 .init_early = imx1_init_early, 42 - .init_irq = mx1_init_irq, 23 + .init_irq = imx1_init_irq, 43 24 .dt_compat = imx1_dt_board_compat, 44 25 .restart = mxc_restart, 45 26 MACHINE_END
-155
arch/arm/mach-imx/iomux-mx1.h
··· 1 - /* 2 - * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de> 3 - * 4 - * This program is free software; you can redistribute it and/or 5 - * modify it under the terms of the GNU General Public License 6 - * as published by the Free Software Foundation; either version 2 7 - * of the License, or (at your option) any later version. 8 - * This program is distributed in the hope that it will be useful, 9 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 - * GNU General Public License for more details. 12 - * 13 - * You should have received a copy of the GNU General Public License 14 - * along with this program; if not, write to the Free Software 15 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 16 - * MA 02110-1301, USA. 17 - */ 18 - #ifndef __MACH_IOMUX_MX1_H__ 19 - #define __MACH_IOMUX_MX1_H__ 20 - 21 - #include "iomux-v1.h" 22 - 23 - #define PA0_AIN_SPI2_CLK (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 0) 24 - #define PA0_AF_ETMTRACESYNC (GPIO_PORTA | GPIO_AF | 0) 25 - #define PA1_AOUT_SPI2_RXD (GPIO_PORTA | GPIO_AOUT | GPIO_IN | 1) 26 - #define PA1_PF_TIN (GPIO_PORTA | GPIO_PF | 1) 27 - #define PA2_PF_PWM0 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 2) 28 - #define PA3_PF_CSI_MCLK (GPIO_PORTA | GPIO_PF | 3) 29 - #define PA4_PF_CSI_D0 (GPIO_PORTA | GPIO_PF | 4) 30 - #define PA5_PF_CSI_D1 (GPIO_PORTA | GPIO_PF | 5) 31 - #define PA6_PF_CSI_D2 (GPIO_PORTA | GPIO_PF | 6) 32 - #define PA7_PF_CSI_D3 (GPIO_PORTA | GPIO_PF | 7) 33 - #define PA8_PF_CSI_D4 (GPIO_PORTA | GPIO_PF | 8) 34 - #define PA9_PF_CSI_D5 (GPIO_PORTA | GPIO_PF | 9) 35 - #define PA10_PF_CSI_D6 (GPIO_PORTA | GPIO_PF | 10) 36 - #define PA11_PF_CSI_D7 (GPIO_PORTA | GPIO_PF | 11) 37 - #define PA12_PF_CSI_VSYNC (GPIO_PORTA | GPIO_PF | 12) 38 - #define PA13_PF_CSI_HSYNC (GPIO_PORTA | GPIO_PF | 13) 39 - #define PA14_PF_CSI_PIXCLK (GPIO_PORTA | GPIO_PF | 14) 40 - #define PA15_PF_I2C_SDA (GPIO_PORTA | GPIO_PF | GPIO_OUT | 15) 41 - #define PA16_PF_I2C_SCL (GPIO_PORTA | GPIO_PF | GPIO_OUT | 16) 42 - #define PA17_AF_ETMTRACEPKT4 (GPIO_PORTA | GPIO_AF | 17) 43 - #define PA17_AIN_SPI2_SS (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 17) 44 - #define PA18_AF_ETMTRACEPKT5 (GPIO_PORTA | GPIO_AF | 18) 45 - #define PA19_AF_ETMTRACEPKT6 (GPIO_PORTA | GPIO_AF | 19) 46 - #define PA20_AF_ETMTRACEPKT7 (GPIO_PORTA | GPIO_AF | 20) 47 - #define PA21_PF_A0 (GPIO_PORTA | GPIO_PF | 21) 48 - #define PA22_PF_CS4 (GPIO_PORTA | GPIO_PF | 22) 49 - #define PA23_PF_CS5 (GPIO_PORTA | GPIO_PF | 23) 50 - #define PA24_PF_A16 (GPIO_PORTA | GPIO_PF | 24) 51 - #define PA24_AF_ETMTRACEPKT0 (GPIO_PORTA | GPIO_AF | 24) 52 - #define PA25_PF_A17 (GPIO_PORTA | GPIO_PF | 25) 53 - #define PA25_AF_ETMTRACEPKT1 (GPIO_PORTA | GPIO_AF | 25) 54 - #define PA26_PF_A18 (GPIO_PORTA | GPIO_PF | 26) 55 - #define PA26_AF_ETMTRACEPKT2 (GPIO_PORTA | GPIO_AF | 26) 56 - #define PA27_PF_A19 (GPIO_PORTA | GPIO_PF | 27) 57 - #define PA27_AF_ETMTRACEPKT3 (GPIO_PORTA | GPIO_AF | 27) 58 - #define PA28_PF_A20 (GPIO_PORTA | GPIO_PF | 28) 59 - #define PA28_AF_ETMPIPESTAT0 (GPIO_PORTA | GPIO_AF | 28) 60 - #define PA29_PF_A21 (GPIO_PORTA | GPIO_PF | 29) 61 - #define PA29_AF_ETMPIPESTAT1 (GPIO_PORTA | GPIO_AF | 29) 62 - #define PA30_PF_A22 (GPIO_PORTA | GPIO_PF | 30) 63 - #define PA30_AF_ETMPIPESTAT2 (GPIO_PORTA | GPIO_AF | 30) 64 - #define PA31_PF_A23 (GPIO_PORTA | GPIO_PF | 31) 65 - #define PA31_AF_ETMTRACECLK (GPIO_PORTA | GPIO_AF | 31) 66 - #define PB8_PF_SD_DAT0 (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 8) 67 - #define PB8_AF_MS_PIO (GPIO_PORTB | GPIO_AF | 8) 68 - #define PB9_PF_SD_DAT1 (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 9) 69 - #define PB9_AF_MS_PI1 (GPIO_PORTB | GPIO_AF | 9) 70 - #define PB10_PF_SD_DAT2 (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 10) 71 - #define PB10_AF_MS_SCLKI (GPIO_PORTB | GPIO_AF | 10) 72 - #define PB11_PF_SD_DAT3 (GPIO_PORTB | GPIO_PF | 11) 73 - #define PB11_AF_MS_SDIO (GPIO_PORTB | GPIO_AF | 11) 74 - #define PB12_PF_SD_CLK (GPIO_PORTB | GPIO_PF | 12) 75 - #define PB12_AF_MS_SCLK0 (GPIO_PORTB | GPIO_AF | 12) 76 - #define PB13_PF_SD_CMD (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 13) 77 - #define PB13_AF_MS_BS (GPIO_PORTB | GPIO_AF | 13) 78 - #define PB14_AF_SSI_RXFS (GPIO_PORTB | GPIO_AF | 14) 79 - #define PB15_AF_SSI_RXCLK (GPIO_PORTB | GPIO_AF | 15) 80 - #define PB16_AF_SSI_RXDAT (GPIO_PORTB | GPIO_AF | GPIO_IN | 16) 81 - #define PB17_AF_SSI_TXDAT (GPIO_PORTB | GPIO_AF | GPIO_OUT | 17) 82 - #define PB18_AF_SSI_TXFS (GPIO_PORTB | GPIO_AF | 18) 83 - #define PB19_AF_SSI_TXCLK (GPIO_PORTB | GPIO_AF | 19) 84 - #define PB20_PF_USBD_AFE (GPIO_PORTB | GPIO_PF | 20) 85 - #define PB21_PF_USBD_OE (GPIO_PORTB | GPIO_PF | 21) 86 - #define PB22_PF_USBD_RCV (GPIO_PORTB | GPIO_PF | 22) 87 - #define PB23_PF_USBD_SUSPND (GPIO_PORTB | GPIO_PF | 23) 88 - #define PB24_PF_USBD_VP (GPIO_PORTB | GPIO_PF | 24) 89 - #define PB25_PF_USBD_VM (GPIO_PORTB | GPIO_PF | 25) 90 - #define PB26_PF_USBD_VPO (GPIO_PORTB | GPIO_PF | 26) 91 - #define PB27_PF_USBD_VMO (GPIO_PORTB | GPIO_PF | 27) 92 - #define PB28_PF_UART2_CTS (GPIO_PORTB | GPIO_PF | GPIO_OUT | 28) 93 - #define PB29_PF_UART2_RTS (GPIO_PORTB | GPIO_PF | GPIO_IN | 29) 94 - #define PB30_PF_UART2_TXD (GPIO_PORTB | GPIO_PF | GPIO_OUT | 30) 95 - #define PB31_PF_UART2_RXD (GPIO_PORTB | GPIO_PF | GPIO_IN | 31) 96 - #define PC3_PF_SSI_RXFS (GPIO_PORTC | GPIO_PF | 3) 97 - #define PC4_PF_SSI_RXCLK (GPIO_PORTC | GPIO_PF | 4) 98 - #define PC5_PF_SSI_RXDAT (GPIO_PORTC | GPIO_PF | GPIO_IN | 5) 99 - #define PC6_PF_SSI_TXDAT (GPIO_PORTC | GPIO_PF | GPIO_OUT | 6) 100 - #define PC7_PF_SSI_TXFS (GPIO_PORTC | GPIO_PF | 7) 101 - #define PC8_PF_SSI_TXCLK (GPIO_PORTC | GPIO_PF | 8) 102 - #define PC9_PF_UART1_CTS (GPIO_PORTC | GPIO_PF | GPIO_OUT | 9) 103 - #define PC10_PF_UART1_RTS (GPIO_PORTC | GPIO_PF | GPIO_IN | 10) 104 - #define PC11_PF_UART1_TXD (GPIO_PORTC | GPIO_PF | GPIO_OUT | 11) 105 - #define PC12_PF_UART1_RXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 12) 106 - #define PC13_PF_SPI1_SPI_RDY (GPIO_PORTC | GPIO_PF | 13) 107 - #define PC14_PF_SPI1_SCLK (GPIO_PORTC | GPIO_PF | 14) 108 - #define PC15_PF_SPI1_SS (GPIO_PORTC | GPIO_PF | 15) 109 - #define PC16_PF_SPI1_MISO (GPIO_PORTC | GPIO_PF | 16) 110 - #define PC17_PF_SPI1_MOSI (GPIO_PORTC | GPIO_PF | 17) 111 - #define PC24_BIN_UART3_RI (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 24) 112 - #define PC25_BIN_UART3_DSR (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 25) 113 - #define PC26_AOUT_UART3_DTR (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 26) 114 - #define PC27_BIN_UART3_DCD (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 27) 115 - #define PC28_BIN_UART3_CTS (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 28) 116 - #define PC29_AOUT_UART3_RTS (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 29) 117 - #define PC30_BIN_UART3_TX (GPIO_PORTC | GPIO_BIN | 30) 118 - #define PC31_AOUT_UART3_RX (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 31) 119 - #define PD6_PF_LSCLK (GPIO_PORTD | GPIO_PF | GPIO_OUT | 6) 120 - #define PD7_PF_REV (GPIO_PORTD | GPIO_PF | 7) 121 - #define PD7_AF_UART2_DTR (GPIO_PORTD | GPIO_AF | GPIO_IN | 7) 122 - #define PD7_AIN_SPI2_SCLK (GPIO_PORTD | GPIO_AIN | 7) 123 - #define PD8_PF_CLS (GPIO_PORTD | GPIO_PF | 8) 124 - #define PD8_AF_UART2_DCD (GPIO_PORTD | GPIO_AF | GPIO_OUT | 8) 125 - #define PD8_AIN_SPI2_SS (GPIO_PORTD | GPIO_AIN | 8) 126 - #define PD9_PF_PS (GPIO_PORTD | GPIO_PF | 9) 127 - #define PD9_AF_UART2_RI (GPIO_PORTD | GPIO_AF | GPIO_OUT | 9) 128 - #define PD9_AOUT_SPI2_RXD (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 9) 129 - #define PD10_PF_SPL_SPR (GPIO_PORTD | GPIO_PF | GPIO_OUT | 10) 130 - #define PD10_AF_UART2_DSR (GPIO_PORTD | GPIO_AF | GPIO_OUT | 10) 131 - #define PD10_AIN_SPI2_TXD (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 10) 132 - #define PD11_PF_CONTRAST (GPIO_PORTD | GPIO_PF | GPIO_OUT | 11) 133 - #define PD12_PF_ACD_OE (GPIO_PORTD | GPIO_PF | GPIO_OUT | 12) 134 - #define PD13_PF_LP_HSYNC (GPIO_PORTD | GPIO_PF | GPIO_OUT | 13) 135 - #define PD14_PF_FLM_VSYNC (GPIO_PORTD | GPIO_PF | GPIO_OUT | 14) 136 - #define PD15_PF_LD0 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 15) 137 - #define PD16_PF_LD1 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 16) 138 - #define PD17_PF_LD2 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 17) 139 - #define PD18_PF_LD3 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 18) 140 - #define PD19_PF_LD4 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 19) 141 - #define PD20_PF_LD5 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 20) 142 - #define PD21_PF_LD6 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 21) 143 - #define PD22_PF_LD7 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 22) 144 - #define PD23_PF_LD8 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 23) 145 - #define PD24_PF_LD9 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 24) 146 - #define PD25_PF_LD10 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 25) 147 - #define PD26_PF_LD11 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 26) 148 - #define PD27_PF_LD12 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 27) 149 - #define PD28_PF_LD13 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 28) 150 - #define PD29_PF_LD14 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 29) 151 - #define PD30_PF_LD15 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 30) 152 - #define PD31_PF_TMR2OUT (GPIO_PORTD | GPIO_PF | 31) 153 - #define PD31_BIN_SPI2_TXD (GPIO_PORTD | GPIO_BIN | 31) 154 - 155 - #endif /* ifndef __MACH_IOMUX_MX1_H__ */
-34
arch/arm/mach-imx/iomux-mx3.h
··· 598 598 #define MX31_PIN_CONTRAST__CONTRAST IOMUX_MODE(MX31_PIN_CONTRAST, IOMUX_CONFIG_FUNC) 599 599 #define MX31_PIN_D3_SPL__D3_SPL IOMUX_MODE(MX31_PIN_D3_SPL, IOMUX_CONFIG_FUNC) 600 600 #define MX31_PIN_D3_CLS__D3_CLS IOMUX_MODE(MX31_PIN_D3_CLS, IOMUX_CONFIG_FUNC) 601 - #define MX31_PIN_LCS0__GPI03_23 IOMUX_MODE(MX31_PIN_LCS0, IOMUX_CONFIG_GPIO) 602 601 #define MX31_PIN_GPIO1_1__GPIO IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO) 603 - #define MX31_PIN_I2C_CLK__SCL IOMUX_MODE(MX31_PIN_I2C_CLK, IOMUX_CONFIG_FUNC) 604 - #define MX31_PIN_I2C_DAT__SDA IOMUX_MODE(MX31_PIN_I2C_DAT, IOMUX_CONFIG_FUNC) 605 602 #define MX31_PIN_DCD_DTE1__I2C2_SDA IOMUX_MODE(MX31_PIN_DCD_DTE1, IOMUX_CONFIG_ALT2) 606 603 #define MX31_PIN_RI_DTE1__I2C2_SCL IOMUX_MODE(MX31_PIN_RI_DTE1, IOMUX_CONFIG_ALT2) 607 604 #define MX31_PIN_CSPI2_SS2__I2C3_SDA IOMUX_MODE(MX31_PIN_CSPI2_SS2, IOMUX_CONFIG_ALT1) ··· 662 665 #define MX31_PIN_USB_OC__GPIO1_30 IOMUX_MODE(MX31_PIN_USB_OC, IOMUX_CONFIG_GPIO) 663 666 #define MX31_PIN_I2C_DAT__I2C1_SDA IOMUX_MODE(MX31_PIN_I2C_DAT, IOMUX_CONFIG_FUNC) 664 667 #define MX31_PIN_I2C_CLK__I2C1_SCL IOMUX_MODE(MX31_PIN_I2C_CLK, IOMUX_CONFIG_FUNC) 665 - #define MX31_PIN_DCD_DTE1__I2C2_SDA IOMUX_MODE(MX31_PIN_DCD_DTE1, IOMUX_CONFIG_ALT2) 666 - #define MX31_PIN_RI_DTE1__I2C2_SCL IOMUX_MODE(MX31_PIN_RI_DTE1, IOMUX_CONFIG_ALT2) 667 - #define MX31_PIN_ATA_CS0__GPIO3_26 IOMUX_MODE(MX31_PIN_ATA_CS0, IOMUX_CONFIG_GPIO) 668 - #define MX31_PIN_ATA_CS1__GPIO3_27 IOMUX_MODE(MX31_PIN_ATA_CS1, IOMUX_CONFIG_GPIO) 669 - #define MX31_PIN_PC_PWRON__SD2_DATA3 IOMUX_MODE(MX31_PIN_PC_PWRON, IOMUX_CONFIG_ALT1) 670 - #define MX31_PIN_PC_VS1__SD2_DATA2 IOMUX_MODE(MX31_PIN_PC_VS1, IOMUX_CONFIG_ALT1) 671 - #define MX31_PIN_PC_READY__SD2_DATA1 IOMUX_MODE(MX31_PIN_PC_READY, IOMUX_CONFIG_ALT1) 672 - #define MX31_PIN_PC_WAIT_B__SD2_DATA0 IOMUX_MODE(MX31_PIN_PC_WAIT_B, IOMUX_CONFIG_ALT1) 673 - #define MX31_PIN_PC_CD2_B__SD2_CLK IOMUX_MODE(MX31_PIN_PC_CD2_B, IOMUX_CONFIG_ALT1) 674 - #define MX31_PIN_PC_CD1_B__SD2_CMD IOMUX_MODE(MX31_PIN_PC_CD1_B, IOMUX_CONFIG_ALT1) 675 - #define MX31_PIN_ATA_DIOR__GPIO3_28 IOMUX_MODE(MX31_PIN_ATA_DIOR, IOMUX_CONFIG_GPIO) 676 - #define MX31_PIN_ATA_DIOW__GPIO3_29 IOMUX_MODE(MX31_PIN_ATA_DIOW, IOMUX_CONFIG_GPIO) 677 - #define MX31_PIN_CSI_D4__CSI_D4 IOMUX_MODE(MX31_PIN_CSI_D4, IOMUX_CONFIG_FUNC) 678 - #define MX31_PIN_CSI_D5__CSI_D5 IOMUX_MODE(MX31_PIN_CSI_D5, IOMUX_CONFIG_FUNC) 679 - #define MX31_PIN_CSI_D6__CSI_D6 IOMUX_MODE(MX31_PIN_CSI_D6, IOMUX_CONFIG_FUNC) 680 - #define MX31_PIN_CSI_D7__CSI_D7 IOMUX_MODE(MX31_PIN_CSI_D7, IOMUX_CONFIG_FUNC) 681 - #define MX31_PIN_CSI_D8__CSI_D8 IOMUX_MODE(MX31_PIN_CSI_D8, IOMUX_CONFIG_FUNC) 682 - #define MX31_PIN_CSI_D9__CSI_D9 IOMUX_MODE(MX31_PIN_CSI_D9, IOMUX_CONFIG_FUNC) 683 - #define MX31_PIN_CSI_D10__CSI_D10 IOMUX_MODE(MX31_PIN_CSI_D10, IOMUX_CONFIG_FUNC) 684 - #define MX31_PIN_CSI_D11__CSI_D11 IOMUX_MODE(MX31_PIN_CSI_D11, IOMUX_CONFIG_FUNC) 685 - #define MX31_PIN_CSI_D12__CSI_D12 IOMUX_MODE(MX31_PIN_CSI_D12, IOMUX_CONFIG_FUNC) 686 - #define MX31_PIN_CSI_D13__CSI_D13 IOMUX_MODE(MX31_PIN_CSI_D13, IOMUX_CONFIG_FUNC) 687 - #define MX31_PIN_CSI_D14__CSI_D14 IOMUX_MODE(MX31_PIN_CSI_D14, IOMUX_CONFIG_FUNC) 688 - #define MX31_PIN_CSI_D15__CSI_D15 IOMUX_MODE(MX31_PIN_CSI_D15, IOMUX_CONFIG_FUNC) 689 - #define MX31_PIN_CSI_HSYNC__CSI_HSYNC IOMUX_MODE(MX31_PIN_CSI_HSYNC, IOMUX_CONFIG_FUNC) 690 - #define MX31_PIN_CSI_MCLK__CSI_MCLK IOMUX_MODE(MX31_PIN_CSI_MCLK, IOMUX_CONFIG_FUNC) 691 - #define MX31_PIN_CSI_PIXCLK__CSI_PIXCLK IOMUX_MODE(MX31_PIN_CSI_PIXCLK, IOMUX_CONFIG_FUNC) 692 - #define MX31_PIN_CSI_VSYNC__CSI_VSYNC IOMUX_MODE(MX31_PIN_CSI_VSYNC, IOMUX_CONFIG_FUNC) 693 - #define MX31_PIN_GPIO3_0__GPIO3_0 IOMUX_MODE(MX31_PIN_GPIO3_0, IOMUX_CONFIG_GPIO) 694 - #define MX31_PIN_GPIO3_1__GPIO3_1 IOMUX_MODE(MX31_PIN_GPIO3_1, IOMUX_CONFIG_GPIO) 695 - #define MX31_PIN_TXD2__GPIO1_28 IOMUX_MODE(MX31_PIN_TXD2, IOMUX_CONFIG_GPIO) 696 668 #define MX31_PIN_GPIO1_0__GPIO1_0 IOMUX_MODE(MX31_PIN_GPIO1_0, IOMUX_CONFIG_GPIO) 697 669 #define MX31_PIN_SVEN0__GPIO2_0 IOMUX_MODE(MX31_PIN_SVEN0, IOMUX_CONFIG_GPIO) 698 670 #define MX31_PIN_STX0__GPIO2_1 IOMUX_MODE(MX31_PIN_STX0, IOMUX_CONFIG_GPIO)
-148
arch/arm/mach-imx/mach-apf9328.c
··· 1 - /* 2 - * linux/arch/arm/mach-imx/mach-apf9328.c 3 - * 4 - * Copyright (c) 2005-2011 ARMadeus systems <support@armadeus.com> 5 - * 6 - * This work is based on mach-scb9328.c which is: 7 - * Copyright (c) 2004 Sascha Hauer <saschahauer@web.de> 8 - * Copyright (c) 2006-2008 Juergen Beisert <jbeisert@netscape.net> 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 version 2 as 12 - * published by the Free Software Foundation. 13 - * 14 - */ 15 - 16 - #include <linux/init.h> 17 - #include <linux/kernel.h> 18 - #include <linux/platform_device.h> 19 - #include <linux/mtd/physmap.h> 20 - #include <linux/dm9000.h> 21 - #include <linux/gpio.h> 22 - #include <linux/i2c.h> 23 - 24 - #include <asm/mach-types.h> 25 - #include <asm/mach/arch.h> 26 - #include <asm/mach/time.h> 27 - 28 - #include "common.h" 29 - #include "devices-imx1.h" 30 - #include "hardware.h" 31 - #include "iomux-mx1.h" 32 - 33 - static const int apf9328_pins[] __initconst = { 34 - /* UART1 */ 35 - PC9_PF_UART1_CTS, 36 - PC10_PF_UART1_RTS, 37 - PC11_PF_UART1_TXD, 38 - PC12_PF_UART1_RXD, 39 - /* UART2 */ 40 - PB28_PF_UART2_CTS, 41 - PB29_PF_UART2_RTS, 42 - PB30_PF_UART2_TXD, 43 - PB31_PF_UART2_RXD, 44 - /* I2C */ 45 - PA15_PF_I2C_SDA, 46 - PA16_PF_I2C_SCL, 47 - }; 48 - 49 - /* 50 - * The APF9328 can have up to 32MB NOR Flash 51 - */ 52 - static struct resource flash_resource = { 53 - .start = MX1_CS0_PHYS, 54 - .end = MX1_CS0_PHYS + SZ_32M - 1, 55 - .flags = IORESOURCE_MEM, 56 - }; 57 - 58 - static struct physmap_flash_data apf9328_flash_data = { 59 - .width = 2, 60 - }; 61 - 62 - static struct platform_device apf9328_flash_device = { 63 - .name = "physmap-flash", 64 - .id = 0, 65 - .dev = { 66 - .platform_data = &apf9328_flash_data, 67 - }, 68 - .resource = &flash_resource, 69 - .num_resources = 1, 70 - }; 71 - 72 - /* 73 - * APF9328 has a DM9000 Ethernet controller 74 - */ 75 - static struct dm9000_plat_data dm9000_setup = { 76 - .flags = DM9000_PLATF_16BITONLY 77 - }; 78 - 79 - static struct resource dm9000_resources[] = { 80 - { 81 - .start = MX1_CS4_PHYS + 0x00C00000, 82 - .end = MX1_CS4_PHYS + 0x00C00001, 83 - .flags = IORESOURCE_MEM, 84 - }, { 85 - .start = MX1_CS4_PHYS + 0x00C00002, 86 - .end = MX1_CS4_PHYS + 0x00C00003, 87 - .flags = IORESOURCE_MEM, 88 - }, { 89 - /* irq number is run-time assigned */ 90 - .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, 91 - }, 92 - }; 93 - 94 - static struct platform_device dm9000x_device = { 95 - .name = "dm9000", 96 - .id = 0, 97 - .num_resources = ARRAY_SIZE(dm9000_resources), 98 - .resource = dm9000_resources, 99 - .dev = { 100 - .platform_data = &dm9000_setup, 101 - } 102 - }; 103 - 104 - static const struct imxuart_platform_data uart1_pdata __initconst = { 105 - .flags = IMXUART_HAVE_RTSCTS, 106 - }; 107 - 108 - static const struct imxi2c_platform_data apf9328_i2c_data __initconst = { 109 - .bitrate = 100000, 110 - }; 111 - 112 - static struct platform_device *devices[] __initdata = { 113 - &apf9328_flash_device, 114 - &dm9000x_device, 115 - }; 116 - 117 - static void __init apf9328_init(void) 118 - { 119 - imx1_soc_init(); 120 - 121 - mxc_gpio_setup_multiple_pins(apf9328_pins, 122 - ARRAY_SIZE(apf9328_pins), 123 - "APF9328"); 124 - 125 - imx1_add_imx_uart0(NULL); 126 - imx1_add_imx_uart1(&uart1_pdata); 127 - 128 - imx1_add_imx_i2c(&apf9328_i2c_data); 129 - 130 - dm9000_resources[2].start = gpio_to_irq(IMX_GPIO_NR(2, 14)); 131 - dm9000_resources[2].end = gpio_to_irq(IMX_GPIO_NR(2, 14)); 132 - platform_add_devices(devices, ARRAY_SIZE(devices)); 133 - } 134 - 135 - static void __init apf9328_timer_init(void) 136 - { 137 - mx1_clocks_init(32768); 138 - } 139 - 140 - MACHINE_START(APF9328, "Armadeus APF9328") 141 - /* Maintainer: Gwenhael Goavec-Merou, ARMadeus Systems */ 142 - .map_io = mx1_map_io, 143 - .init_early = imx1_init_early, 144 - .init_irq = mx1_init_irq, 145 - .init_time = apf9328_timer_init, 146 - .init_machine = apf9328_init, 147 - .restart = mxc_restart, 148 - MACHINE_END
+3 -3
arch/arm/mach-imx/mach-kzm_arm11_01.c
··· 63 63 */ 64 64 #define KZM_ARM11_16550 (MX31_CS4_BASE_ADDR + 0x1050) 65 65 66 - #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) 66 + #if IS_ENABLED(CONFIG_SERIAL_8250) 67 67 /* 68 68 * KZM-ARM11-01 has an external UART on FPGA 69 69 */ ··· 141 141 /* 142 142 * SMSC LAN9118 143 143 */ 144 - #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 144 + #if IS_ENABLED(CONFIG_SMSC911X) 145 145 static struct smsc911x_platform_config kzm_smsc9118_config = { 146 146 .phy_interface = PHY_INTERFACE_MODE_MII, 147 147 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH, ··· 201 201 } 202 202 #endif 203 203 204 - #if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE) 204 + #if IS_ENABLED(CONFIG_SERIAL_IMX) 205 205 static const struct imxuart_platform_data uart_pdata __initconst = { 206 206 .flags = IMXUART_HAVE_RTSCTS, 207 207 };
+1 -1
arch/arm/mach-imx/mach-pcm037.c
··· 149 149 MX31_PIN_CONTRAST__CONTRAST, 150 150 MX31_PIN_D3_SPL__D3_SPL, 151 151 MX31_PIN_D3_CLS__D3_CLS, 152 - MX31_PIN_LCS0__GPI03_23, 152 + MX31_PIN_LCS0__GPIO3_23, 153 153 /* CSI */ 154 154 IOMUX_MODE(MX31_PIN_CSI_D5, IOMUX_CONFIG_GPIO), 155 155 MX31_PIN_CSI_D6__CSI_D6,
-143
arch/arm/mach-imx/mach-scb9328.c
··· 1 - /* 2 - * linux/arch/arm/mach-mx1/mach-scb9328.c 3 - * 4 - * Copyright (c) 2004 Sascha Hauer <saschahauer@web.de> 5 - * Copyright (c) 2006-2008 Juergen Beisert <jbeisert@netscape.net> 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 - 13 - #include <linux/platform_device.h> 14 - #include <linux/mtd/physmap.h> 15 - #include <linux/interrupt.h> 16 - #include <linux/dm9000.h> 17 - #include <linux/gpio.h> 18 - 19 - #include <asm/mach-types.h> 20 - #include <asm/mach/arch.h> 21 - #include <asm/mach/time.h> 22 - 23 - #include "common.h" 24 - #include "devices-imx1.h" 25 - #include "hardware.h" 26 - #include "iomux-mx1.h" 27 - 28 - /* 29 - * This scb9328 has a 32MiB flash 30 - */ 31 - static struct resource flash_resource = { 32 - .start = MX1_CS0_PHYS, 33 - .end = MX1_CS0_PHYS + (32 * 1024 * 1024) - 1, 34 - .flags = IORESOURCE_MEM, 35 - }; 36 - 37 - static struct physmap_flash_data scb_flash_data = { 38 - .width = 2, 39 - }; 40 - 41 - static struct platform_device scb_flash_device = { 42 - .name = "physmap-flash", 43 - .id = 0, 44 - .dev = { 45 - .platform_data = &scb_flash_data, 46 - }, 47 - .resource = &flash_resource, 48 - .num_resources = 1, 49 - }; 50 - 51 - /* 52 - * scb9328 has a DM9000 network controller 53 - * connected to CS5, with 16 bit data path 54 - * and interrupt connected to GPIO 3 55 - */ 56 - 57 - /* 58 - * internal datapath is fixed 16 bit 59 - */ 60 - static struct dm9000_plat_data dm9000_platdata = { 61 - .flags = DM9000_PLATF_16BITONLY, 62 - }; 63 - 64 - /* 65 - * the DM9000 drivers wants two defined address spaces 66 - * to gain access to address latch registers and the data path. 67 - */ 68 - static struct resource dm9000x_resources[] = { 69 - { 70 - .name = "address area", 71 - .start = MX1_CS5_PHYS, 72 - .end = MX1_CS5_PHYS + 1, 73 - .flags = IORESOURCE_MEM, /* address access */ 74 - }, { 75 - .name = "data area", 76 - .start = MX1_CS5_PHYS + 4, 77 - .end = MX1_CS5_PHYS + 5, 78 - .flags = IORESOURCE_MEM, /* data access */ 79 - }, { 80 - /* irq number is run-time assigned */ 81 - .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, 82 - }, 83 - }; 84 - 85 - static struct platform_device dm9000x_device = { 86 - .name = "dm9000", 87 - .id = 0, 88 - .num_resources = ARRAY_SIZE(dm9000x_resources), 89 - .resource = dm9000x_resources, 90 - .dev = { 91 - .platform_data = &dm9000_platdata, 92 - } 93 - }; 94 - 95 - static const int mxc_uart1_pins[] = { 96 - PC9_PF_UART1_CTS, 97 - PC10_PF_UART1_RTS, 98 - PC11_PF_UART1_TXD, 99 - PC12_PF_UART1_RXD, 100 - }; 101 - 102 - static const struct imxuart_platform_data uart_pdata __initconst = { 103 - .flags = IMXUART_HAVE_RTSCTS, 104 - }; 105 - 106 - static struct platform_device *devices[] __initdata = { 107 - &scb_flash_device, 108 - &dm9000x_device, 109 - }; 110 - 111 - /* 112 - * scb9328_init - Init the CPU card itself 113 - */ 114 - static void __init scb9328_init(void) 115 - { 116 - imx1_soc_init(); 117 - 118 - mxc_gpio_setup_multiple_pins(mxc_uart1_pins, 119 - ARRAY_SIZE(mxc_uart1_pins), "UART1"); 120 - 121 - imx1_add_imx_uart0(&uart_pdata); 122 - 123 - printk(KERN_INFO"Scb9328: Adding devices\n"); 124 - dm9000x_resources[2].start = gpio_to_irq(IMX_GPIO_NR(3, 3)); 125 - dm9000x_resources[2].end = gpio_to_irq(IMX_GPIO_NR(3, 3)); 126 - platform_add_devices(devices, ARRAY_SIZE(devices)); 127 - } 128 - 129 - static void __init scb9328_timer_init(void) 130 - { 131 - mx1_clocks_init(32000); 132 - } 133 - 134 - MACHINE_START(SCB9328, "Synertronixx scb9328") 135 - /* Sascha Hauer */ 136 - .atag_offset = 100, 137 - .map_io = mx1_map_io, 138 - .init_early = imx1_init_early, 139 - .init_irq = mx1_init_irq, 140 - .init_time = scb9328_timer_init, 141 - .init_machine = scb9328_init, 142 - .restart = mxc_restart, 143 - MACHINE_END
-67
arch/arm/mach-imx/mm-imx1.c
··· 1 - /* 2 - * author: Sascha Hauer 3 - * Created: april 20th, 2004 4 - * Copyright: Synertronixx GmbH 5 - * 6 - * Common code for i.MX1 machines 7 - * 8 - * This program is free software; you can redistribute it and/or modify 9 - * it under the terms of the GNU General Public License as published by 10 - * the Free Software Foundation; either version 2 of the License, or 11 - * (at your option) any later version. 12 - * 13 - * This program is distributed in the hope that it will be useful, 14 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 - * GNU General Public License for more details. 17 - */ 18 - #include <linux/kernel.h> 19 - #include <linux/init.h> 20 - #include <linux/io.h> 21 - #include <linux/pinctrl/machine.h> 22 - 23 - #include <asm/mach/map.h> 24 - 25 - #include "common.h" 26 - #include "devices/devices-common.h" 27 - #include "hardware.h" 28 - #include "iomux-v1.h" 29 - 30 - static struct map_desc imx_io_desc[] __initdata = { 31 - imx_map_entry(MX1, IO, MT_DEVICE), 32 - }; 33 - 34 - void __init mx1_map_io(void) 35 - { 36 - iotable_init(imx_io_desc, ARRAY_SIZE(imx_io_desc)); 37 - } 38 - 39 - void __init imx1_init_early(void) 40 - { 41 - mxc_set_cpu_type(MXC_CPU_MX1); 42 - imx_iomuxv1_init(MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR), 43 - MX1_NUM_GPIO_PORT); 44 - } 45 - 46 - void __init mx1_init_irq(void) 47 - { 48 - mxc_init_irq(MX1_IO_ADDRESS(MX1_AVIC_BASE_ADDR)); 49 - } 50 - 51 - void __init imx1_soc_init(void) 52 - { 53 - imx1_reset_init(MX1_IO_ADDRESS(MX1_WDT_BASE_ADDR)); 54 - mxc_device_init(); 55 - 56 - mxc_register_gpio("imx1-gpio", 0, MX1_GPIO1_BASE_ADDR, SZ_256, 57 - MX1_GPIO_INT_PORTA, 0); 58 - mxc_register_gpio("imx1-gpio", 1, MX1_GPIO2_BASE_ADDR, SZ_256, 59 - MX1_GPIO_INT_PORTB, 0); 60 - mxc_register_gpio("imx1-gpio", 2, MX1_GPIO3_BASE_ADDR, SZ_256, 61 - MX1_GPIO_INT_PORTC, 0); 62 - mxc_register_gpio("imx1-gpio", 3, MX1_GPIO4_BASE_ADDR, SZ_256, 63 - MX1_GPIO_INT_PORTD, 0); 64 - imx_add_imx_dma("imx1-dma", MX1_DMA_BASE_ADDR, 65 - MX1_DMA_INT, MX1_DMA_ERR); 66 - pinctrl_provide_dummies(); 67 - }
-172
arch/arm/mach-imx/mx1.h
··· 1 - /* 2 - * Copyright (C) 1997,1998 Russell King 3 - * Copyright (C) 1999 ARM Limited 4 - * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. 5 - * Copyright (c) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt> 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 __MACH_MX1_H__ 13 - #define __MACH_MX1_H__ 14 - 15 - /* 16 - * Memory map 17 - */ 18 - #define MX1_IO_BASE_ADDR 0x00200000 19 - #define MX1_IO_SIZE SZ_1M 20 - 21 - #define MX1_CS0_PHYS 0x10000000 22 - #define MX1_CS0_SIZE 0x02000000 23 - 24 - #define MX1_CS1_PHYS 0x12000000 25 - #define MX1_CS1_SIZE 0x01000000 26 - 27 - #define MX1_CS2_PHYS 0x13000000 28 - #define MX1_CS2_SIZE 0x01000000 29 - 30 - #define MX1_CS3_PHYS 0x14000000 31 - #define MX1_CS3_SIZE 0x01000000 32 - 33 - #define MX1_CS4_PHYS 0x15000000 34 - #define MX1_CS4_SIZE 0x01000000 35 - 36 - #define MX1_CS5_PHYS 0x16000000 37 - #define MX1_CS5_SIZE 0x01000000 38 - 39 - /* 40 - * Register BASEs, based on OFFSETs 41 - */ 42 - #define MX1_AIPI1_BASE_ADDR (0x00000 + MX1_IO_BASE_ADDR) 43 - #define MX1_WDT_BASE_ADDR (0x01000 + MX1_IO_BASE_ADDR) 44 - #define MX1_TIM1_BASE_ADDR (0x02000 + MX1_IO_BASE_ADDR) 45 - #define MX1_TIM2_BASE_ADDR (0x03000 + MX1_IO_BASE_ADDR) 46 - #define MX1_RTC_BASE_ADDR (0x04000 + MX1_IO_BASE_ADDR) 47 - #define MX1_LCDC_BASE_ADDR (0x05000 + MX1_IO_BASE_ADDR) 48 - #define MX1_UART1_BASE_ADDR (0x06000 + MX1_IO_BASE_ADDR) 49 - #define MX1_UART2_BASE_ADDR (0x07000 + MX1_IO_BASE_ADDR) 50 - #define MX1_PWM_BASE_ADDR (0x08000 + MX1_IO_BASE_ADDR) 51 - #define MX1_DMA_BASE_ADDR (0x09000 + MX1_IO_BASE_ADDR) 52 - #define MX1_AIPI2_BASE_ADDR (0x10000 + MX1_IO_BASE_ADDR) 53 - #define MX1_SIM_BASE_ADDR (0x11000 + MX1_IO_BASE_ADDR) 54 - #define MX1_USBD_BASE_ADDR (0x12000 + MX1_IO_BASE_ADDR) 55 - #define MX1_CSPI1_BASE_ADDR (0x13000 + MX1_IO_BASE_ADDR) 56 - #define MX1_MMC_BASE_ADDR (0x14000 + MX1_IO_BASE_ADDR) 57 - #define MX1_ASP_BASE_ADDR (0x15000 + MX1_IO_BASE_ADDR) 58 - #define MX1_BTA_BASE_ADDR (0x16000 + MX1_IO_BASE_ADDR) 59 - #define MX1_I2C_BASE_ADDR (0x17000 + MX1_IO_BASE_ADDR) 60 - #define MX1_SSI_BASE_ADDR (0x18000 + MX1_IO_BASE_ADDR) 61 - #define MX1_CSPI2_BASE_ADDR (0x19000 + MX1_IO_BASE_ADDR) 62 - #define MX1_MSHC_BASE_ADDR (0x1A000 + MX1_IO_BASE_ADDR) 63 - #define MX1_CCM_BASE_ADDR (0x1B000 + MX1_IO_BASE_ADDR) 64 - #define MX1_SCM_BASE_ADDR (0x1B804 + MX1_IO_BASE_ADDR) 65 - #define MX1_GPIO_BASE_ADDR (0x1C000 + MX1_IO_BASE_ADDR) 66 - #define MX1_GPIO1_BASE_ADDR (0x1C000 + MX1_IO_BASE_ADDR) 67 - #define MX1_GPIO2_BASE_ADDR (0x1C100 + MX1_IO_BASE_ADDR) 68 - #define MX1_GPIO3_BASE_ADDR (0x1C200 + MX1_IO_BASE_ADDR) 69 - #define MX1_GPIO4_BASE_ADDR (0x1C300 + MX1_IO_BASE_ADDR) 70 - #define MX1_EIM_BASE_ADDR (0x20000 + MX1_IO_BASE_ADDR) 71 - #define MX1_SDRAMC_BASE_ADDR (0x21000 + MX1_IO_BASE_ADDR) 72 - #define MX1_MMA_BASE_ADDR (0x22000 + MX1_IO_BASE_ADDR) 73 - #define MX1_AVIC_BASE_ADDR (0x23000 + MX1_IO_BASE_ADDR) 74 - #define MX1_CSI_BASE_ADDR (0x24000 + MX1_IO_BASE_ADDR) 75 - 76 - /* macro to get at IO space when running virtually */ 77 - #define MX1_IO_P2V(x) IMX_IO_P2V(x) 78 - #define MX1_IO_ADDRESS(x) IOMEM(MX1_IO_P2V(x)) 79 - 80 - /* fixed interrput numbers */ 81 - #include <asm/irq.h> 82 - #define MX1_INT_SOFTINT (NR_IRQS_LEGACY + 0) 83 - #define MX1_INT_CSI (NR_IRQS_LEGACY + 6) 84 - #define MX1_DSPA_MAC_INT (NR_IRQS_LEGACY + 7) 85 - #define MX1_DSPA_INT (NR_IRQS_LEGACY + 8) 86 - #define MX1_COMP_INT (NR_IRQS_LEGACY + 9) 87 - #define MX1_MSHC_XINT (NR_IRQS_LEGACY + 10) 88 - #define MX1_GPIO_INT_PORTA (NR_IRQS_LEGACY + 11) 89 - #define MX1_GPIO_INT_PORTB (NR_IRQS_LEGACY + 12) 90 - #define MX1_GPIO_INT_PORTC (NR_IRQS_LEGACY + 13) 91 - #define MX1_INT_LCDC (NR_IRQS_LEGACY + 14) 92 - #define MX1_SIM_INT (NR_IRQS_LEGACY + 15) 93 - #define MX1_SIM_DATA_INT (NR_IRQS_LEGACY + 16) 94 - #define MX1_RTC_INT (NR_IRQS_LEGACY + 17) 95 - #define MX1_RTC_SAMINT (NR_IRQS_LEGACY + 18) 96 - #define MX1_INT_UART2PFERR (NR_IRQS_LEGACY + 19) 97 - #define MX1_INT_UART2RTS (NR_IRQS_LEGACY + 20) 98 - #define MX1_INT_UART2DTR (NR_IRQS_LEGACY + 21) 99 - #define MX1_INT_UART2UARTC (NR_IRQS_LEGACY + 22) 100 - #define MX1_INT_UART2TX (NR_IRQS_LEGACY + 23) 101 - #define MX1_INT_UART2RX (NR_IRQS_LEGACY + 24) 102 - #define MX1_INT_UART1PFERR (NR_IRQS_LEGACY + 25) 103 - #define MX1_INT_UART1RTS (NR_IRQS_LEGACY + 26) 104 - #define MX1_INT_UART1DTR (NR_IRQS_LEGACY + 27) 105 - #define MX1_INT_UART1UARTC (NR_IRQS_LEGACY + 28) 106 - #define MX1_INT_UART1TX (NR_IRQS_LEGACY + 29) 107 - #define MX1_INT_UART1RX (NR_IRQS_LEGACY + 30) 108 - #define MX1_VOICE_DAC_INT (NR_IRQS_LEGACY + 31) 109 - #define MX1_VOICE_ADC_INT (NR_IRQS_LEGACY + 32) 110 - #define MX1_PEN_DATA_INT (NR_IRQS_LEGACY + 33) 111 - #define MX1_PWM_INT (NR_IRQS_LEGACY + 34) 112 - #define MX1_SDHC_INT (NR_IRQS_LEGACY + 35) 113 - #define MX1_INT_I2C (NR_IRQS_LEGACY + 39) 114 - #define MX1_INT_CSPI2 (NR_IRQS_LEGACY + 40) 115 - #define MX1_INT_CSPI1 (NR_IRQS_LEGACY + 41) 116 - #define MX1_SSI_TX_INT (NR_IRQS_LEGACY + 42) 117 - #define MX1_SSI_TX_ERR_INT (NR_IRQS_LEGACY + 43) 118 - #define MX1_SSI_RX_INT (NR_IRQS_LEGACY + 44) 119 - #define MX1_SSI_RX_ERR_INT (NR_IRQS_LEGACY + 45) 120 - #define MX1_TOUCH_INT (NR_IRQS_LEGACY + 46) 121 - #define MX1_INT_USBD0 (NR_IRQS_LEGACY + 47) 122 - #define MX1_INT_USBD1 (NR_IRQS_LEGACY + 48) 123 - #define MX1_INT_USBD2 (NR_IRQS_LEGACY + 49) 124 - #define MX1_INT_USBD3 (NR_IRQS_LEGACY + 50) 125 - #define MX1_INT_USBD4 (NR_IRQS_LEGACY + 51) 126 - #define MX1_INT_USBD5 (NR_IRQS_LEGACY + 52) 127 - #define MX1_INT_USBD6 (NR_IRQS_LEGACY + 53) 128 - #define MX1_BTSYS_INT (NR_IRQS_LEGACY + 55) 129 - #define MX1_BTTIM_INT (NR_IRQS_LEGACY + 56) 130 - #define MX1_BTWUI_INT (NR_IRQS_LEGACY + 57) 131 - #define MX1_TIM2_INT (NR_IRQS_LEGACY + 58) 132 - #define MX1_TIM1_INT (NR_IRQS_LEGACY + 59) 133 - #define MX1_DMA_ERR (NR_IRQS_LEGACY + 60) 134 - #define MX1_DMA_INT (NR_IRQS_LEGACY + 61) 135 - #define MX1_GPIO_INT_PORTD (NR_IRQS_LEGACY + 62) 136 - #define MX1_WDT_INT (NR_IRQS_LEGACY + 63) 137 - 138 - /* DMA */ 139 - #define MX1_DMA_REQ_UART3_T 2 140 - #define MX1_DMA_REQ_UART3_R 3 141 - #define MX1_DMA_REQ_SSI2_T 4 142 - #define MX1_DMA_REQ_SSI2_R 5 143 - #define MX1_DMA_REQ_CSI_STAT 6 144 - #define MX1_DMA_REQ_CSI_R 7 145 - #define MX1_DMA_REQ_MSHC 8 146 - #define MX1_DMA_REQ_DSPA_DCT_DOUT 9 147 - #define MX1_DMA_REQ_DSPA_DCT_DIN 10 148 - #define MX1_DMA_REQ_DSPA_MAC 11 149 - #define MX1_DMA_REQ_EXT 12 150 - #define MX1_DMA_REQ_SDHC 13 151 - #define MX1_DMA_REQ_SPI1_R 14 152 - #define MX1_DMA_REQ_SPI1_T 15 153 - #define MX1_DMA_REQ_SSI_T 16 154 - #define MX1_DMA_REQ_SSI_R 17 155 - #define MX1_DMA_REQ_ASP_DAC 18 156 - #define MX1_DMA_REQ_ASP_ADC 19 157 - #define MX1_DMA_REQ_USP_EP(x) (20 + (x)) 158 - #define MX1_DMA_REQ_SPI2_R 26 159 - #define MX1_DMA_REQ_SPI2_T 27 160 - #define MX1_DMA_REQ_UART2_T 28 161 - #define MX1_DMA_REQ_UART2_R 29 162 - #define MX1_DMA_REQ_UART1_T 30 163 - #define MX1_DMA_REQ_UART1_R 31 164 - 165 - /* 166 - * This doesn't depend on IMX_NEEDS_DEPRECATED_SYMBOLS 167 - * to not break drivers/usb/gadget/imx_udc. Should go 168 - * away after this driver uses the new name. 169 - */ 170 - #define USBD_INT0 MX1_INT_USBD0 171 - 172 - #endif /* ifndef __MACH_MX1_H__ */
-77
arch/arm/mach-mxs/mach-mxs.c
··· 268 268 apx4devkit_phy_fixup); 269 269 } 270 270 271 - #define ENET0_MDC__GPIO_4_0 MXS_GPIO_NR(4, 0) 272 - #define ENET0_MDIO__GPIO_4_1 MXS_GPIO_NR(4, 1) 273 - #define ENET0_RX_EN__GPIO_4_2 MXS_GPIO_NR(4, 2) 274 - #define ENET0_RXD0__GPIO_4_3 MXS_GPIO_NR(4, 3) 275 - #define ENET0_RXD1__GPIO_4_4 MXS_GPIO_NR(4, 4) 276 - #define ENET0_TX_EN__GPIO_4_6 MXS_GPIO_NR(4, 6) 277 - #define ENET0_TXD0__GPIO_4_7 MXS_GPIO_NR(4, 7) 278 - #define ENET0_TXD1__GPIO_4_8 MXS_GPIO_NR(4, 8) 279 - #define ENET_CLK__GPIO_4_16 MXS_GPIO_NR(4, 16) 280 - 281 - #define TX28_FEC_PHY_POWER MXS_GPIO_NR(3, 29) 282 - #define TX28_FEC_PHY_RESET MXS_GPIO_NR(4, 13) 283 - #define TX28_FEC_nINT MXS_GPIO_NR(4, 5) 284 - 285 - static const struct gpio const tx28_gpios[] __initconst = { 286 - { ENET0_MDC__GPIO_4_0, GPIOF_OUT_INIT_LOW, "GPIO_4_0" }, 287 - { ENET0_MDIO__GPIO_4_1, GPIOF_OUT_INIT_LOW, "GPIO_4_1" }, 288 - { ENET0_RX_EN__GPIO_4_2, GPIOF_OUT_INIT_LOW, "GPIO_4_2" }, 289 - { ENET0_RXD0__GPIO_4_3, GPIOF_OUT_INIT_LOW, "GPIO_4_3" }, 290 - { ENET0_RXD1__GPIO_4_4, GPIOF_OUT_INIT_LOW, "GPIO_4_4" }, 291 - { ENET0_TX_EN__GPIO_4_6, GPIOF_OUT_INIT_LOW, "GPIO_4_6" }, 292 - { ENET0_TXD0__GPIO_4_7, GPIOF_OUT_INIT_LOW, "GPIO_4_7" }, 293 - { ENET0_TXD1__GPIO_4_8, GPIOF_OUT_INIT_LOW, "GPIO_4_8" }, 294 - { ENET_CLK__GPIO_4_16, GPIOF_OUT_INIT_LOW, "GPIO_4_16" }, 295 - { TX28_FEC_PHY_POWER, GPIOF_OUT_INIT_LOW, "fec-phy-power" }, 296 - { TX28_FEC_PHY_RESET, GPIOF_OUT_INIT_LOW, "fec-phy-reset" }, 297 - { TX28_FEC_nINT, GPIOF_DIR_IN, "fec-int" }, 298 - }; 299 - 300 - static void __init tx28_post_init(void) 301 - { 302 - struct device_node *np; 303 - struct platform_device *pdev; 304 - struct pinctrl *pctl; 305 - int ret; 306 - 307 - enable_clk_enet_out(); 308 - 309 - np = of_find_compatible_node(NULL, NULL, "fsl,imx28-fec"); 310 - pdev = of_find_device_by_node(np); 311 - if (!pdev) { 312 - pr_err("%s: failed to find fec device\n", __func__); 313 - return; 314 - } 315 - 316 - pctl = pinctrl_get_select(&pdev->dev, "gpio_mode"); 317 - if (IS_ERR(pctl)) { 318 - pr_err("%s: failed to get pinctrl state\n", __func__); 319 - return; 320 - } 321 - 322 - ret = gpio_request_array(tx28_gpios, ARRAY_SIZE(tx28_gpios)); 323 - if (ret) { 324 - pr_err("%s: failed to request gpios: %d\n", __func__, ret); 325 - return; 326 - } 327 - 328 - /* Power up fec phy */ 329 - gpio_set_value(TX28_FEC_PHY_POWER, 1); 330 - msleep(26); /* 25ms according to data sheet */ 331 - 332 - /* Mode strap pins */ 333 - gpio_set_value(ENET0_RX_EN__GPIO_4_2, 1); 334 - gpio_set_value(ENET0_RXD0__GPIO_4_3, 1); 335 - gpio_set_value(ENET0_RXD1__GPIO_4_4, 1); 336 - 337 - udelay(100); /* minimum assertion time for nRST */ 338 - 339 - /* Deasserting FEC PHY RESET */ 340 - gpio_set_value(TX28_FEC_PHY_RESET, 1); 341 - 342 - pinctrl_put(pctl); 343 - } 344 - 345 271 static void __init crystalfontz_init(void) 346 272 { 347 273 update_fec_mac_prop(OUI_CRYSTALFONTZ); ··· 427 501 of_platform_default_populate(NULL, NULL, parent); 428 502 429 503 mxs_restart_init(); 430 - 431 - if (of_machine_is_compatible("karo,tx28")) 432 - tx28_post_init(); 433 504 } 434 505 435 506 #define MXS_CLKCTRL_RESET_CHIP (1 << 1)
+5 -41
drivers/clk/imx/clk-imx1.c
··· 45 45 #define CCM_PCDR (ccm + 0x0020) 46 46 #define SCM_GCCR (ccm + 0x0810) 47 47 48 - static void __init _mx1_clocks_init(unsigned long fref) 48 + static void __init mx1_clocks_init_dt(struct device_node *np) 49 49 { 50 + ccm = of_iomap(np, 0); 51 + BUG_ON(!ccm); 52 + 50 53 clk[IMX1_CLK_DUMMY] = imx_clk_fixed("dummy", 0); 51 - clk[IMX1_CLK_CLK32] = imx_obtain_fixed_clock("clk32", fref); 54 + clk[IMX1_CLK_CLK32] = imx_obtain_fixed_clock("clk32", 32768); 52 55 clk[IMX1_CLK_CLK16M_EXT] = imx_clk_fixed("clk16m_ext", 16000000); 53 56 clk[IMX1_CLK_CLK16M] = imx_clk_gate("clk16m", "clk16m_ext", CCM_CSCR, 17); 54 57 clk[IMX1_CLK_CLK32_PREMULT] = imx_clk_fixed_factor("clk32_premult", "clk32", 512, 1); ··· 77 74 clk[IMX1_CLK_USBD_GATE] = imx_clk_gate("usbd_gate", "clk48m", SCM_GCCR, 0); 78 75 79 76 imx_check_clocks(clk, ARRAY_SIZE(clk)); 80 - } 81 - 82 - int __init mx1_clocks_init(unsigned long fref) 83 - { 84 - ccm = ioremap(MX1_CCM_BASE_ADDR, SZ_4K); 85 - BUG_ON(!ccm); 86 - 87 - _mx1_clocks_init(fref); 88 - 89 - clk_register_clkdev(clk[IMX1_CLK_PER1], "per", "imx-gpt.0"); 90 - clk_register_clkdev(clk[IMX1_CLK_HCLK], "ipg", "imx-gpt.0"); 91 - clk_register_clkdev(clk[IMX1_CLK_DMA_GATE], "ahb", "imx1-dma"); 92 - clk_register_clkdev(clk[IMX1_CLK_HCLK], "ipg", "imx1-dma"); 93 - clk_register_clkdev(clk[IMX1_CLK_PER1], "per", "imx1-uart.0"); 94 - clk_register_clkdev(clk[IMX1_CLK_HCLK], "ipg", "imx1-uart.0"); 95 - clk_register_clkdev(clk[IMX1_CLK_PER1], "per", "imx1-uart.1"); 96 - clk_register_clkdev(clk[IMX1_CLK_HCLK], "ipg", "imx1-uart.1"); 97 - clk_register_clkdev(clk[IMX1_CLK_PER1], "per", "imx1-uart.2"); 98 - clk_register_clkdev(clk[IMX1_CLK_UART3_GATE], "ipg", "imx1-uart.2"); 99 - clk_register_clkdev(clk[IMX1_CLK_HCLK], NULL, "imx1-i2c.0"); 100 - clk_register_clkdev(clk[IMX1_CLK_PER2], "per", "imx1-cspi.0"); 101 - clk_register_clkdev(clk[IMX1_CLK_DUMMY], "ipg", "imx1-cspi.0"); 102 - clk_register_clkdev(clk[IMX1_CLK_PER2], "per", "imx1-cspi.1"); 103 - clk_register_clkdev(clk[IMX1_CLK_DUMMY], "ipg", "imx1-cspi.1"); 104 - clk_register_clkdev(clk[IMX1_CLK_PER2], "per", "imx1-fb.0"); 105 - clk_register_clkdev(clk[IMX1_CLK_DUMMY], "ipg", "imx1-fb.0"); 106 - clk_register_clkdev(clk[IMX1_CLK_DUMMY], "ahb", "imx1-fb.0"); 107 - 108 - mxc_timer_init(MX1_TIM1_BASE_ADDR, MX1_TIM1_INT, GPT_TYPE_IMX1); 109 - 110 - return 0; 111 - } 112 - 113 - static void __init mx1_clocks_init_dt(struct device_node *np) 114 - { 115 - ccm = of_iomap(np, 0); 116 - BUG_ON(!ccm); 117 - 118 - _mx1_clocks_init(32768); 119 77 120 78 clk_data.clks = clk; 121 79 clk_data.clk_num = ARRAY_SIZE(clk);