ARM: omap1: move mach/usb.h to include/linux/soc
The register definitions in this header are used in at least four different places, with little hope of completely cleaning that up. Split up the file into a portion that becomes a linux-wide header under include/linux/soc/ti/, and the parts that are actually only needed by board files. Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
parent
cc81e34480
commit
e8e77e9750
@ -38,7 +38,7 @@
|
||||
#include <mach/mux.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/usb.h>
|
||||
#include "usb.h"
|
||||
|
||||
#include "ams-delta-fiq.h"
|
||||
#include "board-ams-delta.h"
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include <mach/mux.h>
|
||||
|
||||
#include <mach/usb.h>
|
||||
#include "usb.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include "flash.h"
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/usb.h>
|
||||
#include "usb.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "board-h2.h"
|
||||
|
@ -45,7 +45,7 @@
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/usb.h>
|
||||
#include "usb.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "board-h3.h"
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "mmc.h"
|
||||
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/usb.h>
|
||||
#include "usb.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include <linux/platform_data/keypad-omap.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/usb.h>
|
||||
#include "usb.h"
|
||||
|
||||
#include "iomap.h"
|
||||
#include "common.h"
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <mach/mux.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/usb.h>
|
||||
#include "usb.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "clock.h"
|
||||
|
@ -52,7 +52,7 @@
|
||||
#include <mach/tc.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/usb.h>
|
||||
#include "usb.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include <linux/platform_data/keypad-omap.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/usb.h>
|
||||
#include "usb.h"
|
||||
|
||||
#include "mmc.h"
|
||||
#include "common.h"
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include <linux/platform_data/keypad-omap.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/usb.h>
|
||||
#include "usb.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include <linux/platform_data/keypad-omap.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/usb.h>
|
||||
#include "usb.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include "board-sx1.h"
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/usb.h>
|
||||
#include "usb.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "soc.h"
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/usb.h> /* for OTG_BASE */
|
||||
#include "usb.h" /* for OTG_BASE */
|
||||
|
||||
#include "iomap.h"
|
||||
#include "clock.h"
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include <mach/mux.h>
|
||||
|
||||
#include <mach/usb.h>
|
||||
#include "usb.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
|
25
arch/arm/mach-omap1/usb.h
Normal file
25
arch/arm/mach-omap1/usb.h
Normal file
@ -0,0 +1,25 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* fixme correct answer depends on hmc_mode,
|
||||
* as does (on omap1) any nonzero value for config->otg port number
|
||||
*/
|
||||
#include <linux/platform_data/usb-omap1.h>
|
||||
#include <linux/soc/ti/omap1-usb.h>
|
||||
|
||||
#if IS_ENABLED(CONFIG_USB_OMAP)
|
||||
#define is_usb0_device(config) 1
|
||||
#else
|
||||
#define is_usb0_device(config) 0
|
||||
#endif
|
||||
|
||||
#if IS_ENABLED(CONFIG_USB_SUPPORT)
|
||||
void omap1_usb_init(struct omap_usb_config *pdata);
|
||||
#else
|
||||
static inline void omap1_usb_init(struct omap_usb_config *pdata)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#define OMAP1_OHCI_BASE 0xfffba000
|
||||
#define OMAP2_OHCI_BASE 0x4805e000
|
||||
#define OMAP_OHCI_BASE OMAP1_OHCI_BASE
|
@ -40,8 +40,9 @@
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
#include <linux/omap-dma.h>
|
||||
#include <linux/platform_data/usb-omap1.h>
|
||||
|
||||
#include <mach/usb.h>
|
||||
#include <linux/soc/ti/omap1-usb.h>
|
||||
|
||||
#include "omap_udc.h"
|
||||
|
||||
|
@ -25,6 +25,8 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/usb/otg.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/platform_data/usb-omap1.h>
|
||||
#include <linux/soc/ti/omap1-usb.h>
|
||||
#include <linux/signal.h>
|
||||
#include <linux/usb.h>
|
||||
#include <linux/usb/hcd.h>
|
||||
@ -37,8 +39,6 @@
|
||||
#include <mach/mux.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/usb.h>
|
||||
|
||||
|
||||
#define DRIVER_DESC "OHCI OMAP driver"
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#include <mach/mux.h>
|
||||
|
||||
#include <mach/usb.h>
|
||||
#include <linux/soc/ti/omap1-usb.h>
|
||||
|
||||
#undef VERBOSE
|
||||
|
||||
|
@ -1,34 +1,20 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef __SOC_TI_OMAP1_USB
|
||||
#define __SOC_TI_OMAP1_USB
|
||||
/*
|
||||
* FIXME correct answer depends on hmc_mode,
|
||||
* as does (on omap1) any nonzero value for config->otg port number
|
||||
* Constants in this file are used all over the place, in platform
|
||||
* code, as well as the udc, phy and ohci drivers.
|
||||
* This is not a great design, but unlikely to get fixed after
|
||||
* such a long time. Don't do this elsewhere.
|
||||
*/
|
||||
#if IS_ENABLED(CONFIG_USB_OMAP)
|
||||
#define is_usb0_device(config) 1
|
||||
#else
|
||||
#define is_usb0_device(config) 0
|
||||
#endif
|
||||
|
||||
#include <linux/platform_data/usb-omap1.h>
|
||||
|
||||
#if IS_ENABLED(CONFIG_USB_SUPPORT)
|
||||
void omap1_usb_init(struct omap_usb_config *pdata);
|
||||
#else
|
||||
static inline void omap1_usb_init(struct omap_usb_config *pdata)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#define OMAP1_OTG_BASE 0xfffb0400
|
||||
#define OMAP1_UDC_BASE 0xfffb4000
|
||||
#define OMAP1_OHCI_BASE 0xfffba000
|
||||
|
||||
#define OMAP2_OHCI_BASE 0x4805e000
|
||||
#define OMAP2_UDC_BASE 0x4805e200
|
||||
#define OMAP2_OTG_BASE 0x4805e300
|
||||
#define OTG_BASE OMAP1_OTG_BASE
|
||||
#define UDC_BASE OMAP1_UDC_BASE
|
||||
#define OMAP_OHCI_BASE OMAP1_OHCI_BASE
|
||||
|
||||
/*
|
||||
* OTG and transceiver registers, for OMAPs starting with ARM926
|
||||
@ -126,3 +112,5 @@ static inline void omap1_usb_init(struct omap_usb_config *pdata)
|
||||
# define CONF_USB0_ISOLATE_R (1 << 3)
|
||||
# define CONF_USB_PWRDN_DM_R (1 << 2)
|
||||
# define CONF_USB_PWRDN_DP_R (1 << 1)
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user