aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/pmcs-msp71xx
diff options
context:
space:
mode:
authorPaul Bolle <pebolle@tiscali.nl>2014-05-22 05:34:51 -0400
committerRalf Baechle <ralf@linux-mips.org>2014-05-23 09:12:39 -0400
commitd493a85c0486b6240e71db63d1454eab6c3be683 (patch)
treed0561c105c932fac059681b94ab288b21cc96d46 /arch/mips/pmcs-msp71xx
parentd83d44c0e03737d201681c927d6707ae4f283720 (diff)
MIPS: MSP71xx: Remove checks for two macros
Since v2.6.39 there are checks for CONFIG_MSP_HAS_DUAL_USB and checks for CONFIG_MSP_HAS_TSMAC in the code. The related Kconfig symbols have never been added. These checks have evaluated to false for three years now. Remove them and the code they have been hiding. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-mips@linux-mips.org Cc: linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/6982/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/pmcs-msp71xx')
-rw-r--r--arch/mips/pmcs-msp71xx/msp_eth.c76
-rw-r--r--arch/mips/pmcs-msp71xx/msp_usb.c90
2 files changed, 0 insertions, 166 deletions
diff --git a/arch/mips/pmcs-msp71xx/msp_eth.c b/arch/mips/pmcs-msp71xx/msp_eth.c
index c584df393de2..15679b427f44 100644
--- a/arch/mips/pmcs-msp71xx/msp_eth.c
+++ b/arch/mips/pmcs-msp71xx/msp_eth.c
@@ -38,73 +38,6 @@
38#define MSP_ETHERNET_GPIO1 15 38#define MSP_ETHERNET_GPIO1 15
39#define MSP_ETHERNET_GPIO2 16 39#define MSP_ETHERNET_GPIO2 16
40 40
41#ifdef CONFIG_MSP_HAS_TSMAC
42#define MSP_TSMAC_SIZE 0x10020
43#define MSP_TSMAC_ID "pmc_tsmac"
44
45static struct resource msp_tsmac0_resources[] = {
46 [0] = {
47 .start = MSP_MAC0_BASE,
48 .end = MSP_MAC0_BASE + MSP_TSMAC_SIZE - 1,
49 .flags = IORESOURCE_MEM,
50 },
51 [1] = {
52 .start = MSP_INT_MAC0,
53 .end = MSP_INT_MAC0,
54 .flags = IORESOURCE_IRQ,
55 },
56};
57
58static struct resource msp_tsmac1_resources[] = {
59 [0] = {
60 .start = MSP_MAC1_BASE,
61 .end = MSP_MAC1_BASE + MSP_TSMAC_SIZE - 1,
62 .flags = IORESOURCE_MEM,
63 },
64 [1] = {
65 .start = MSP_INT_MAC1,
66 .end = MSP_INT_MAC1,
67 .flags = IORESOURCE_IRQ,
68 },
69};
70static struct resource msp_tsmac2_resources[] = {
71 [0] = {
72 .start = MSP_MAC2_BASE,
73 .end = MSP_MAC2_BASE + MSP_TSMAC_SIZE - 1,
74 .flags = IORESOURCE_MEM,
75 },
76 [1] = {
77 .start = MSP_INT_SAR,
78 .end = MSP_INT_SAR,
79 .flags = IORESOURCE_IRQ,
80 },
81};
82
83
84static struct platform_device tsmac_device[] = {
85 [0] = {
86 .name = MSP_TSMAC_ID,
87 .id = 0,
88 .num_resources = ARRAY_SIZE(msp_tsmac0_resources),
89 .resource = msp_tsmac0_resources,
90 },
91 [1] = {
92 .name = MSP_TSMAC_ID,
93 .id = 1,
94 .num_resources = ARRAY_SIZE(msp_tsmac1_resources),
95 .resource = msp_tsmac1_resources,
96 },
97 [2] = {
98 .name = MSP_TSMAC_ID,
99 .id = 2,
100 .num_resources = ARRAY_SIZE(msp_tsmac2_resources),
101 .resource = msp_tsmac2_resources,
102 },
103};
104#define msp_eth_devs tsmac_device
105
106#else
107/* If it is not TSMAC assume MSP_ETH (100Mbps) */
108#define MSP_ETH_ID "pmc_mspeth" 41#define MSP_ETH_ID "pmc_mspeth"
109#define MSP_ETH_SIZE 0xE0 42#define MSP_ETH_SIZE 0xE0
110static struct resource msp_eth0_resources[] = { 43static struct resource msp_eth0_resources[] = {
@@ -152,7 +85,6 @@ static struct platform_device mspeth_device[] = {
152}; 85};
153#define msp_eth_devs mspeth_device 86#define msp_eth_devs mspeth_device
154 87
155#endif
156int __init msp_eth_setup(void) 88int __init msp_eth_setup(void)
157{ 89{
158 int i, ret = 0; 90 int i, ret = 0;
@@ -161,14 +93,6 @@ int __init msp_eth_setup(void)
161 msp_gpio_pin_mode(MSP_GPIO_OUTPUT, MSP_ETHERNET_GPIO0); 93 msp_gpio_pin_mode(MSP_GPIO_OUTPUT, MSP_ETHERNET_GPIO0);
162 msp_gpio_pin_hi(MSP_ETHERNET_GPIO0); 94 msp_gpio_pin_hi(MSP_ETHERNET_GPIO0);
163 95
164#ifdef CONFIG_MSP_HAS_TSMAC
165 /* 3 phys on boards with TSMAC */
166 msp_gpio_pin_mode(MSP_GPIO_OUTPUT, MSP_ETHERNET_GPIO1);
167 msp_gpio_pin_hi(MSP_ETHERNET_GPIO1);
168
169 msp_gpio_pin_mode(MSP_GPIO_OUTPUT, MSP_ETHERNET_GPIO2);
170 msp_gpio_pin_hi(MSP_ETHERNET_GPIO2);
171#endif
172 for (i = 0; i < ARRAY_SIZE(msp_eth_devs); i++) { 96 for (i = 0; i < ARRAY_SIZE(msp_eth_devs); i++) {
173 ret = platform_device_register(&msp_eth_devs[i]); 97 ret = platform_device_register(&msp_eth_devs[i]);
174 printk(KERN_INFO "device: %d, return value = %d\n", i, ret); 98 printk(KERN_INFO "device: %d, return value = %d\n", i, ret);
diff --git a/arch/mips/pmcs-msp71xx/msp_usb.c b/arch/mips/pmcs-msp71xx/msp_usb.c
index 4dab915696e7..c87c5f810cd1 100644
--- a/arch/mips/pmcs-msp71xx/msp_usb.c
+++ b/arch/mips/pmcs-msp71xx/msp_usb.c
@@ -75,47 +75,6 @@ static struct mspusb_device msp_usbhost0_device = {
75 .resource = msp_usbhost0_resources, 75 .resource = msp_usbhost0_resources,
76 }, 76 },
77}; 77};
78
79/* MSP7140/MSP82XX has two USB2 hosts. */
80#ifdef CONFIG_MSP_HAS_DUAL_USB
81static u64 msp_usbhost1_dma_mask = 0xffffffffUL;
82
83static struct resource msp_usbhost1_resources[] = {
84 [0] = { /* EHCI-HS operational and capabilities registers */
85 .start = MSP_USB1_HS_START,
86 .end = MSP_USB1_HS_END,
87 .flags = IORESOURCE_MEM,
88 },
89 [1] = {
90 .start = MSP_INT_USB,
91 .end = MSP_INT_USB,
92 .flags = IORESOURCE_IRQ,
93 },
94 [2] = { /* MSBus-to-AMBA bridge register space */
95 .start = MSP_USB1_MAB_START,
96 .end = MSP_USB1_MAB_END,
97 .flags = IORESOURCE_MEM,
98 },
99 [3] = { /* Identification and general hardware parameters */
100 .start = MSP_USB1_ID_START,
101 .end = MSP_USB1_ID_END,
102 .flags = IORESOURCE_MEM,
103 },
104};
105
106static struct mspusb_device msp_usbhost1_device = {
107 .dev = {
108 .name = "pmcmsp-ehci",
109 .id = 1,
110 .dev = {
111 .dma_mask = &msp_usbhost1_dma_mask,
112 .coherent_dma_mask = 0xffffffffUL,
113 },
114 .num_resources = ARRAY_SIZE(msp_usbhost1_resources),
115 .resource = msp_usbhost1_resources,
116 },
117};
118#endif /* CONFIG_MSP_HAS_DUAL_USB */
119#endif /* CONFIG_USB_EHCI_HCD */ 78#endif /* CONFIG_USB_EHCI_HCD */
120 79
121#if defined(CONFIG_USB_GADGET) 80#if defined(CONFIG_USB_GADGET)
@@ -157,46 +116,6 @@ static struct mspusb_device msp_usbdev0_device = {
157 .resource = msp_usbdev0_resources, 116 .resource = msp_usbdev0_resources,
158 }, 117 },
159}; 118};
160
161#ifdef CONFIG_MSP_HAS_DUAL_USB
162static struct resource msp_usbdev1_resources[] = {
163 [0] = { /* EHCI-HS operational and capabilities registers */
164 .start = MSP_USB1_HS_START,
165 .end = MSP_USB1_HS_END,
166 .flags = IORESOURCE_MEM,
167 },
168 [1] = {
169 .start = MSP_INT_USB,
170 .end = MSP_INT_USB,
171 .flags = IORESOURCE_IRQ,
172 },
173 [2] = { /* MSBus-to-AMBA bridge register space */
174 .start = MSP_USB1_MAB_START,
175 .end = MSP_USB1_MAB_END,
176 .flags = IORESOURCE_MEM,
177 },
178 [3] = { /* Identification and general hardware parameters */
179 .start = MSP_USB1_ID_START,
180 .end = MSP_USB1_ID_END,
181 .flags = IORESOURCE_MEM,
182 },
183};
184
185/* This may need to be converted to a mspusb_device, too. */
186static struct mspusb_device msp_usbdev1_device = {
187 .dev = {
188 .name = "msp71xx_udc",
189 .id = 0,
190 .dev = {
191 .dma_mask = &msp_usbdev_dma_mask,
192 .coherent_dma_mask = 0xffffffffUL,
193 },
194 .num_resources = ARRAY_SIZE(msp_usbdev1_resources),
195 .resource = msp_usbdev1_resources,
196 },
197};
198
199#endif /* CONFIG_MSP_HAS_DUAL_USB */
200#endif /* CONFIG_USB_GADGET */ 119#endif /* CONFIG_USB_GADGET */
201 120
202static int __init msp_usb_setup(void) 121static int __init msp_usb_setup(void)
@@ -231,10 +150,6 @@ static int __init msp_usb_setup(void)
231#if defined(CONFIG_USB_EHCI_HCD) 150#if defined(CONFIG_USB_EHCI_HCD)
232 msp_devs[0] = &msp_usbhost0_device.dev; 151 msp_devs[0] = &msp_usbhost0_device.dev;
233 ppfinit("platform add USB HOST done %s.\n", msp_devs[0]->name); 152 ppfinit("platform add USB HOST done %s.\n", msp_devs[0]->name);
234#ifdef CONFIG_MSP_HAS_DUAL_USB
235 msp_devs[1] = &msp_usbhost1_device.dev;
236 ppfinit("platform add USB HOST done %s.\n", msp_devs[1]->name);
237#endif
238#else 153#else
239 ppfinit("%s: echi_hcd not supported\n", __FILE__); 154 ppfinit("%s: echi_hcd not supported\n", __FILE__);
240#endif /* CONFIG_USB_EHCI_HCD */ 155#endif /* CONFIG_USB_EHCI_HCD */
@@ -244,11 +159,6 @@ static int __init msp_usb_setup(void)
244 msp_devs[0] = &msp_usbdev0_device.dev; 159 msp_devs[0] = &msp_usbdev0_device.dev;
245 ppfinit("platform add USB DEVICE done %s.\n" 160 ppfinit("platform add USB DEVICE done %s.\n"
246 , msp_devs[0]->name); 161 , msp_devs[0]->name);
247#ifdef CONFIG_MSP_HAS_DUAL_USB
248 msp_devs[1] = &msp_usbdev1_device.dev;
249 ppfinit("platform add USB DEVICE done %s.\n"
250 , msp_devs[1]->name);
251#endif
252#else 162#else
253 ppfinit("%s: usb_gadget not supported\n", __FILE__); 163 ppfinit("%s: usb_gadget not supported\n", __FILE__);
254#endif /* CONFIG_USB_GADGET */ 164#endif /* CONFIG_USB_GADGET */