aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Bailon <abailon@baylibre.com>2016-10-27 11:32:36 -0400
committerSekhar Nori <nsekhar@ti.com>2016-10-31 07:21:56 -0400
commit766763dbdc1dca11deabdb00077a1c19e2803f0a (patch)
tree2e96b8c1227b1eac0ba40d30a524ff7701490f0f
parentfc89017c83b77dd50da2ce893184483a7718f353 (diff)
ARM: davinci: da8xx: Remove duplicated defines
Some macro for DA8xx CFGCHIP are defined in usb-davinci.h, but da8xx-cfgchip.h intend to replace them. Remove duplicated defines between da8xx-cfgchip.h and usb-davinci.h Signed-off-by: Alexandre Bailon <abailon@baylibre.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
-rw-r--r--arch/arm/mach-davinci/board-da830-evm.c5
-rw-r--r--arch/arm/mach-davinci/board-omapl138-hawk.c3
-rw-r--r--include/linux/platform_data/usb-davinci.h23
3 files changed, 5 insertions, 26 deletions
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
index 3d8cf8cbd98a..df1f4091a8ae 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -18,6 +18,7 @@
18#include <linux/i2c.h> 18#include <linux/i2c.h>
19#include <linux/i2c/pcf857x.h> 19#include <linux/i2c/pcf857x.h>
20#include <linux/platform_data/at24.h> 20#include <linux/platform_data/at24.h>
21#include <linux/mfd/da8xx-cfgchip.h>
21#include <linux/mtd/mtd.h> 22#include <linux/mtd/mtd.h>
22#include <linux/mtd/partitions.h> 23#include <linux/mtd/partitions.h>
23#include <linux/spi/spi.h> 24#include <linux/spi/spi.h>
@@ -116,7 +117,7 @@ static __init void da830_evm_usb_init(void)
116 cfgchip2 = __raw_readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG)); 117 cfgchip2 = __raw_readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG));
117 118
118 /* USB2.0 PHY reference clock is 24 MHz */ 119 /* USB2.0 PHY reference clock is 24 MHz */
119 cfgchip2 &= ~CFGCHIP2_REFFREQ; 120 cfgchip2 &= ~CFGCHIP2_REFFREQ_MASK;
120 cfgchip2 |= CFGCHIP2_REFFREQ_24MHZ; 121 cfgchip2 |= CFGCHIP2_REFFREQ_24MHZ;
121 122
122 /* 123 /*
@@ -133,7 +134,7 @@ static __init void da830_evm_usb_init(void)
133 * controller won't be able to drive VBUS thinking that it's a B-device. 134 * controller won't be able to drive VBUS thinking that it's a B-device.
134 * Otherwise, we want to use the OTG mode and enable VBUS comparators. 135 * Otherwise, we want to use the OTG mode and enable VBUS comparators.
135 */ 136 */
136 cfgchip2 &= ~CFGCHIP2_OTGMODE; 137 cfgchip2 &= ~CFGCHIP2_OTGMODE_MASK;
137#ifdef CONFIG_USB_MUSB_HOST 138#ifdef CONFIG_USB_MUSB_HOST
138 cfgchip2 |= CFGCHIP2_FORCE_HOST; 139 cfgchip2 |= CFGCHIP2_FORCE_HOST;
139#else 140#else
diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c
index ee624861ca66..e1efa1066c1e 100644
--- a/arch/arm/mach-davinci/board-omapl138-hawk.c
+++ b/arch/arm/mach-davinci/board-omapl138-hawk.c
@@ -13,6 +13,7 @@
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/console.h> 14#include <linux/console.h>
15#include <linux/gpio.h> 15#include <linux/gpio.h>
16#include <linux/mfd/da8xx-cfgchip.h>
16#include <linux/platform_data/gpio-davinci.h> 17#include <linux/platform_data/gpio-davinci.h>
17 18
18#include <asm/mach-types.h> 19#include <asm/mach-types.h>
@@ -254,7 +255,7 @@ static __init void omapl138_hawk_usb_init(void)
254 /* Setup the Ref. clock frequency for the HAWK at 24 MHz. */ 255 /* Setup the Ref. clock frequency for the HAWK at 24 MHz. */
255 256
256 cfgchip2 = __raw_readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG)); 257 cfgchip2 = __raw_readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG));
257 cfgchip2 &= ~CFGCHIP2_REFFREQ; 258 cfgchip2 &= ~CFGCHIP2_REFFREQ_MASK;
258 cfgchip2 |= CFGCHIP2_REFFREQ_24MHZ; 259 cfgchip2 |= CFGCHIP2_REFFREQ_24MHZ;
259 __raw_writel(cfgchip2, DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG)); 260 __raw_writel(cfgchip2, DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG));
260 261
diff --git a/include/linux/platform_data/usb-davinci.h b/include/linux/platform_data/usb-davinci.h
index e0bc4abe69c2..0926e99f2e8f 100644
--- a/include/linux/platform_data/usb-davinci.h
+++ b/include/linux/platform_data/usb-davinci.h
@@ -11,29 +11,6 @@
11#ifndef __ASM_ARCH_USB_H 11#ifndef __ASM_ARCH_USB_H
12#define __ASM_ARCH_USB_H 12#define __ASM_ARCH_USB_H
13 13
14/* DA8xx CFGCHIP2 (USB 2.0 PHY Control) register bits */
15#define CFGCHIP2_PHYCLKGD (1 << 17)
16#define CFGCHIP2_VBUSSENSE (1 << 16)
17#define CFGCHIP2_RESET (1 << 15)
18#define CFGCHIP2_OTGMODE (3 << 13)
19#define CFGCHIP2_NO_OVERRIDE (0 << 13)
20#define CFGCHIP2_FORCE_HOST (1 << 13)
21#define CFGCHIP2_FORCE_DEVICE (2 << 13)
22#define CFGCHIP2_FORCE_HOST_VBUS_LOW (3 << 13)
23#define CFGCHIP2_USB1PHYCLKMUX (1 << 12)
24#define CFGCHIP2_USB2PHYCLKMUX (1 << 11)
25#define CFGCHIP2_PHYPWRDN (1 << 10)
26#define CFGCHIP2_OTGPWRDN (1 << 9)
27#define CFGCHIP2_DATPOL (1 << 8)
28#define CFGCHIP2_USB1SUSPENDM (1 << 7)
29#define CFGCHIP2_PHY_PLLON (1 << 6) /* override PLL suspend */
30#define CFGCHIP2_SESENDEN (1 << 5) /* Vsess_end comparator */
31#define CFGCHIP2_VBDTCTEN (1 << 4) /* Vbus comparator */
32#define CFGCHIP2_REFFREQ (0xf << 0)
33#define CFGCHIP2_REFFREQ_12MHZ (1 << 0)
34#define CFGCHIP2_REFFREQ_24MHZ (2 << 0)
35#define CFGCHIP2_REFFREQ_48MHZ (3 << 0)
36
37struct da8xx_ohci_root_hub; 14struct da8xx_ohci_root_hub;
38 15
39typedef void (*da8xx_ocic_handler_t)(struct da8xx_ohci_root_hub *hub, 16typedef void (*da8xx_ocic_handler_t)(struct da8xx_ohci_root_hub *hub,