diff options
author | Daniel Glöckner <dg@emlix.com> | 2014-10-18 18:46:25 -0400 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2014-10-21 05:29:01 -0400 |
commit | 4006e565e1500db40b8546dcc6011737bc5d986c (patch) | |
tree | ff158ef0a7de01246cf3793787e50b74c5838218 /arch/xtensa/platforms | |
parent | 3932b9ca55b0be314a36d3e84faff3e823c081f5 (diff) |
xtensa: remove s6000 variant and s6105 platform
The Stretch s6000 family support has been merged into mainline 5 years
ago. There appear to be no users of this code since nobody complained
that there is a merge error preventing compilation.
Apart from the s6105 IP camera reference design there are no s6000 devices
known to ever have run Linux and as the chips are out of production there
probably never will be. The successor s7000 no longer uses an Xtensa core
for the OS.
Let's remove the code until someone is found who actually needs it.
Signed-off-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/platforms')
-rw-r--r-- | arch/xtensa/platforms/s6105/Makefile | 3 | ||||
-rw-r--r-- | arch/xtensa/platforms/s6105/device.c | 161 | ||||
-rw-r--r-- | arch/xtensa/platforms/s6105/include/platform/gpio.h | 27 | ||||
-rw-r--r-- | arch/xtensa/platforms/s6105/include/platform/hardware.h | 11 | ||||
-rw-r--r-- | arch/xtensa/platforms/s6105/include/platform/serial.h | 8 | ||||
-rw-r--r-- | arch/xtensa/platforms/s6105/setup.c | 73 |
6 files changed, 0 insertions, 283 deletions
diff --git a/arch/xtensa/platforms/s6105/Makefile b/arch/xtensa/platforms/s6105/Makefile deleted file mode 100644 index 0be6194bcb72..000000000000 --- a/arch/xtensa/platforms/s6105/Makefile +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | # Makefile for the Stretch S6105 eval board | ||
2 | |||
3 | obj-y := setup.o device.o | ||
diff --git a/arch/xtensa/platforms/s6105/device.c b/arch/xtensa/platforms/s6105/device.c deleted file mode 100644 index 4f4fc971042f..000000000000 --- a/arch/xtensa/platforms/s6105/device.c +++ /dev/null | |||
@@ -1,161 +0,0 @@ | |||
1 | /* | ||
2 | * s6105 platform devices | ||
3 | * | ||
4 | * Copyright (c) 2009 emlix GmbH | ||
5 | */ | ||
6 | |||
7 | #include <linux/kernel.h> | ||
8 | #include <linux/gpio.h> | ||
9 | #include <linux/init.h> | ||
10 | #include <linux/irq.h> | ||
11 | #include <linux/phy.h> | ||
12 | #include <linux/platform_device.h> | ||
13 | #include <linux/serial.h> | ||
14 | #include <linux/serial_8250.h> | ||
15 | |||
16 | #include <variant/hardware.h> | ||
17 | #include <variant/dmac.h> | ||
18 | |||
19 | #include <platform/gpio.h> | ||
20 | |||
21 | #define GPIO3_INTNUM 3 | ||
22 | #define UART_INTNUM 4 | ||
23 | #define GMAC_INTNUM 5 | ||
24 | |||
25 | static const signed char gpio3_irq_mappings[] = { | ||
26 | S6_INTC_GPIO(3), | ||
27 | -1 | ||
28 | }; | ||
29 | |||
30 | static const signed char uart_irq_mappings[] = { | ||
31 | S6_INTC_UART(0), | ||
32 | S6_INTC_UART(1), | ||
33 | -1, | ||
34 | }; | ||
35 | |||
36 | static const signed char gmac_irq_mappings[] = { | ||
37 | S6_INTC_GMAC_STAT, | ||
38 | S6_INTC_GMAC_ERR, | ||
39 | S6_INTC_DMA_HOSTTERMCNT(0), | ||
40 | S6_INTC_DMA_HOSTTERMCNT(1), | ||
41 | -1 | ||
42 | }; | ||
43 | |||
44 | const signed char *platform_irq_mappings[NR_IRQS] = { | ||
45 | [GPIO3_INTNUM] = gpio3_irq_mappings, | ||
46 | [UART_INTNUM] = uart_irq_mappings, | ||
47 | [GMAC_INTNUM] = gmac_irq_mappings, | ||
48 | }; | ||
49 | |||
50 | static struct plat_serial8250_port serial_platform_data[] = { | ||
51 | { | ||
52 | .membase = (void *)S6_REG_UART + 0x0000, | ||
53 | .mapbase = S6_REG_UART + 0x0000, | ||
54 | .irq = UART_INTNUM, | ||
55 | .uartclk = S6_SCLK, | ||
56 | .regshift = 2, | ||
57 | .iotype = SERIAL_IO_MEM, | ||
58 | .flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST, | ||
59 | }, | ||
60 | { | ||
61 | .membase = (void *)S6_REG_UART + 0x1000, | ||
62 | .mapbase = S6_REG_UART + 0x1000, | ||
63 | .irq = UART_INTNUM, | ||
64 | .uartclk = S6_SCLK, | ||
65 | .regshift = 2, | ||
66 | .iotype = SERIAL_IO_MEM, | ||
67 | .flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST, | ||
68 | }, | ||
69 | { }, | ||
70 | }; | ||
71 | |||
72 | static struct resource s6_gmac_resource[] = { | ||
73 | { | ||
74 | .name = "mem", | ||
75 | .start = (resource_size_t)S6_REG_GMAC, | ||
76 | .end = (resource_size_t)S6_REG_GMAC + 0x10000 - 1, | ||
77 | .flags = IORESOURCE_MEM, | ||
78 | }, | ||
79 | { | ||
80 | .name = "dma", | ||
81 | .start = (resource_size_t) | ||
82 | DMA_CHNL(S6_REG_HIFDMA, S6_HIFDMA_GMACTX), | ||
83 | .end = (resource_size_t) | ||
84 | DMA_CHNL(S6_REG_HIFDMA, S6_HIFDMA_GMACTX) + 0x100 - 1, | ||
85 | .flags = IORESOURCE_DMA, | ||
86 | }, | ||
87 | { | ||
88 | .name = "dma", | ||
89 | .start = (resource_size_t) | ||
90 | DMA_CHNL(S6_REG_HIFDMA, S6_HIFDMA_GMACRX), | ||
91 | .end = (resource_size_t) | ||
92 | DMA_CHNL(S6_REG_HIFDMA, S6_HIFDMA_GMACRX) + 0x100 - 1, | ||
93 | .flags = IORESOURCE_DMA, | ||
94 | }, | ||
95 | { | ||
96 | .name = "io", | ||
97 | .start = (resource_size_t)S6_MEM_GMAC, | ||
98 | .end = (resource_size_t)S6_MEM_GMAC + 0x2000000 - 1, | ||
99 | .flags = IORESOURCE_IO, | ||
100 | }, | ||
101 | { | ||
102 | .name = "irq", | ||
103 | .start = (resource_size_t)GMAC_INTNUM, | ||
104 | .flags = IORESOURCE_IRQ, | ||
105 | }, | ||
106 | { | ||
107 | .name = "irq", | ||
108 | .start = (resource_size_t)PHY_POLL, | ||
109 | .flags = IORESOURCE_IRQ, | ||
110 | }, | ||
111 | }; | ||
112 | |||
113 | static int __init prepare_phy_irq(int pin) | ||
114 | { | ||
115 | int irq; | ||
116 | if (gpio_request(pin, "s6gmac_phy") < 0) | ||
117 | goto fail; | ||
118 | if (gpio_direction_input(pin) < 0) | ||
119 | goto free; | ||
120 | irq = gpio_to_irq(pin); | ||
121 | if (irq < 0) | ||
122 | goto free; | ||
123 | if (irq_set_irq_type(irq, IRQ_TYPE_LEVEL_LOW) < 0) | ||
124 | goto free; | ||
125 | return irq; | ||
126 | free: | ||
127 | gpio_free(pin); | ||
128 | fail: | ||
129 | return PHY_POLL; | ||
130 | } | ||
131 | |||
132 | static struct platform_device platform_devices[] = { | ||
133 | { | ||
134 | .name = "serial8250", | ||
135 | .id = PLAT8250_DEV_PLATFORM, | ||
136 | .dev = { | ||
137 | .platform_data = serial_platform_data, | ||
138 | }, | ||
139 | }, | ||
140 | { | ||
141 | .name = "s6gmac", | ||
142 | .id = 0, | ||
143 | .resource = s6_gmac_resource, | ||
144 | .num_resources = ARRAY_SIZE(s6_gmac_resource), | ||
145 | }, | ||
146 | { | ||
147 | I2C_BOARD_INFO("m41t62", S6I2C_ADDR_M41T62), | ||
148 | }, | ||
149 | }; | ||
150 | |||
151 | static int __init device_init(void) | ||
152 | { | ||
153 | int i; | ||
154 | |||
155 | s6_gmac_resource[5].start = prepare_phy_irq(GPIO_PHY_IRQ); | ||
156 | |||
157 | for (i = 0; i < ARRAY_SIZE(platform_devices); i++) | ||
158 | platform_device_register(&platform_devices[i]); | ||
159 | return 0; | ||
160 | } | ||
161 | arch_initcall_sync(device_init); | ||
diff --git a/arch/xtensa/platforms/s6105/include/platform/gpio.h b/arch/xtensa/platforms/s6105/include/platform/gpio.h deleted file mode 100644 index fa11aa4b61e9..000000000000 --- a/arch/xtensa/platforms/s6105/include/platform/gpio.h +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | #ifndef __ASM_XTENSA_S6105_GPIO_H | ||
2 | #define __ASM_XTENSA_S6105_GPIO_H | ||
3 | |||
4 | #define GPIO_BP_TEMP_ALARM 0 | ||
5 | #define GPIO_PB_RESET_IN 1 | ||
6 | #define GPIO_EXP_IRQ 2 | ||
7 | #define GPIO_TRIGGER_IRQ 3 | ||
8 | #define GPIO_RTC_IRQ 4 | ||
9 | #define GPIO_PHY_IRQ 5 | ||
10 | #define GPIO_IMAGER_RESET 6 | ||
11 | #define GPIO_SD_IRQ 7 | ||
12 | #define GPIO_MINI_BOOT_INH 8 | ||
13 | #define GPIO_BOARD_RESET 9 | ||
14 | #define GPIO_EXP_PRESENT 10 | ||
15 | #define GPIO_LED1_NGREEN 12 | ||
16 | #define GPIO_LED1_RED 13 | ||
17 | #define GPIO_LED0_NGREEN 14 | ||
18 | #define GPIO_LED0_NRED 15 | ||
19 | #define GPIO_SPI_CS0 16 | ||
20 | #define GPIO_SPI_CS1 17 | ||
21 | #define GPIO_SPI_CS3 19 | ||
22 | #define GPIO_SPI_CS4 20 | ||
23 | #define GPIO_SD_WP 21 | ||
24 | #define GPIO_BP_RESET 22 | ||
25 | #define GPIO_ALARM_OUT 23 | ||
26 | |||
27 | #endif /* __ASM_XTENSA_S6105_GPIO_H */ | ||
diff --git a/arch/xtensa/platforms/s6105/include/platform/hardware.h b/arch/xtensa/platforms/s6105/include/platform/hardware.h deleted file mode 100644 index d628efac7089..000000000000 --- a/arch/xtensa/platforms/s6105/include/platform/hardware.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #ifndef __XTENSA_S6105_HARDWARE_H | ||
2 | #define __XTENSA_S6105_HARDWARE_H | ||
3 | |||
4 | #define PLATFORM_DEFAULT_MEM_START 0x40000000 | ||
5 | #define PLATFORM_DEFAULT_MEM_SIZE 0x08000000 | ||
6 | |||
7 | #define MAX_DMA_ADDRESS 0 | ||
8 | |||
9 | #define KERNELOFFSET (PLATFORM_DEFAULT_MEM_START + 0x1000) | ||
10 | |||
11 | #endif /* __XTENSA_S6105_HARDWARE_H */ | ||
diff --git a/arch/xtensa/platforms/s6105/include/platform/serial.h b/arch/xtensa/platforms/s6105/include/platform/serial.h deleted file mode 100644 index c8a771e5981b..000000000000 --- a/arch/xtensa/platforms/s6105/include/platform/serial.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #ifndef __ASM_XTENSA_S6105_SERIAL_H | ||
2 | #define __ASM_XTENSA_S6105_SERIAL_H | ||
3 | |||
4 | #include <variant/hardware.h> | ||
5 | |||
6 | #define BASE_BAUD (S6_SCLK / 16) | ||
7 | |||
8 | #endif /* __ASM_XTENSA_S6105_SERIAL_H */ | ||
diff --git a/arch/xtensa/platforms/s6105/setup.c b/arch/xtensa/platforms/s6105/setup.c deleted file mode 100644 index 86ce730f7913..000000000000 --- a/arch/xtensa/platforms/s6105/setup.c +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | /* | ||
2 | * s6105 control routines | ||
3 | * | ||
4 | * Copyright (c) 2009 emlix GmbH | ||
5 | */ | ||
6 | #include <linux/irq.h> | ||
7 | #include <linux/io.h> | ||
8 | #include <linux/gpio.h> | ||
9 | |||
10 | #include <asm/bootparam.h> | ||
11 | |||
12 | #include <variant/hardware.h> | ||
13 | #include <variant/gpio.h> | ||
14 | |||
15 | #include <platform/gpio.h> | ||
16 | |||
17 | void platform_halt(void) | ||
18 | { | ||
19 | local_irq_disable(); | ||
20 | while (1) | ||
21 | ; | ||
22 | } | ||
23 | |||
24 | void platform_power_off(void) | ||
25 | { | ||
26 | platform_halt(); | ||
27 | } | ||
28 | |||
29 | void platform_restart(void) | ||
30 | { | ||
31 | platform_halt(); | ||
32 | } | ||
33 | |||
34 | void __init platform_setup(char **cmdline) | ||
35 | { | ||
36 | unsigned long reg; | ||
37 | |||
38 | reg = readl(S6_REG_GREG1 + S6_GREG1_PLLSEL); | ||
39 | reg &= ~(S6_GREG1_PLLSEL_GMAC_MASK << S6_GREG1_PLLSEL_GMAC | | ||
40 | S6_GREG1_PLLSEL_GMII_MASK << S6_GREG1_PLLSEL_GMII); | ||
41 | reg |= S6_GREG1_PLLSEL_GMAC_125MHZ << S6_GREG1_PLLSEL_GMAC | | ||
42 | S6_GREG1_PLLSEL_GMII_125MHZ << S6_GREG1_PLLSEL_GMII; | ||
43 | writel(reg, S6_REG_GREG1 + S6_GREG1_PLLSEL); | ||
44 | |||
45 | reg = readl(S6_REG_GREG1 + S6_GREG1_CLKGATE); | ||
46 | reg &= ~(1 << S6_GREG1_BLOCK_SB); | ||
47 | reg &= ~(1 << S6_GREG1_BLOCK_GMAC); | ||
48 | writel(reg, S6_REG_GREG1 + S6_GREG1_CLKGATE); | ||
49 | |||
50 | reg = readl(S6_REG_GREG1 + S6_GREG1_BLOCKENA); | ||
51 | reg |= 1 << S6_GREG1_BLOCK_SB; | ||
52 | reg |= 1 << S6_GREG1_BLOCK_GMAC; | ||
53 | writel(reg, S6_REG_GREG1 + S6_GREG1_BLOCKENA); | ||
54 | |||
55 | printk(KERN_NOTICE "S6105 on Stretch S6000 - " | ||
56 | "Copyright (C) 2009 emlix GmbH <info@emlix.com>\n"); | ||
57 | } | ||
58 | |||
59 | void __init platform_init(bp_tag_t *first) | ||
60 | { | ||
61 | s6_gpio_init(0); | ||
62 | gpio_request(GPIO_LED1_NGREEN, "led1_green"); | ||
63 | gpio_request(GPIO_LED1_RED, "led1_red"); | ||
64 | gpio_direction_output(GPIO_LED1_NGREEN, 1); | ||
65 | } | ||
66 | |||
67 | void platform_heartbeat(void) | ||
68 | { | ||
69 | static unsigned int c; | ||
70 | |||
71 | if (!(++c & 0x4F)) | ||
72 | gpio_direction_output(GPIO_LED1_RED, !(c & 0x10)); | ||
73 | } | ||