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

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>

+52 -38
+1 -1
arch/arm/mach-omap1/board-ams-delta.c
··· 38 38 #include <mach/mux.h> 39 39 40 40 #include <mach/hardware.h> 41 - #include <mach/usb.h> 41 + #include "usb.h" 42 42 43 43 #include "ams-delta-fiq.h" 44 44 #include "board-ams-delta.h"
+1 -1
arch/arm/mach-omap1/board-generic.c
··· 21 21 22 22 #include <mach/mux.h> 23 23 24 - #include <mach/usb.h> 24 + #include "usb.h" 25 25 26 26 #include "common.h" 27 27
+1 -1
arch/arm/mach-omap1/board-h2.c
··· 42 42 #include "flash.h" 43 43 44 44 #include <mach/hardware.h> 45 - #include <mach/usb.h> 45 + #include "usb.h" 46 46 47 47 #include "common.h" 48 48 #include "board-h2.h"
+1 -1
arch/arm/mach-omap1/board-h3.c
··· 45 45 46 46 #include <mach/hardware.h> 47 47 #include <mach/irqs.h> 48 - #include <mach/usb.h> 48 + #include "usb.h" 49 49 50 50 #include "common.h" 51 51 #include "board-h3.h"
+1 -1
arch/arm/mach-omap1/board-htcherald.c
··· 31 31 #include "mmc.h" 32 32 33 33 #include <mach/irqs.h> 34 - #include <mach/usb.h> 34 + #include "usb.h" 35 35 36 36 #include "common.h" 37 37
+1 -1
arch/arm/mach-omap1/board-innovator.c
··· 34 34 #include <linux/platform_data/keypad-omap.h> 35 35 36 36 #include <mach/hardware.h> 37 - #include <mach/usb.h> 37 + #include "usb.h" 38 38 39 39 #include "iomap.h" 40 40 #include "common.h"
+1 -1
arch/arm/mach-omap1/board-nokia770.c
··· 31 31 #include <mach/mux.h> 32 32 33 33 #include <mach/hardware.h> 34 - #include <mach/usb.h> 34 + #include "usb.h" 35 35 36 36 #include "common.h" 37 37 #include "clock.h"
+1 -1
arch/arm/mach-omap1/board-osk.c
··· 52 52 #include <mach/tc.h> 53 53 54 54 #include <mach/hardware.h> 55 - #include <mach/usb.h> 55 + #include "usb.h" 56 56 57 57 #include "common.h" 58 58
+1 -1
arch/arm/mach-omap1/board-palmte.c
··· 38 38 #include <linux/platform_data/keypad-omap.h> 39 39 40 40 #include <mach/hardware.h> 41 - #include <mach/usb.h> 41 + #include "usb.h" 42 42 43 43 #include "mmc.h" 44 44 #include "common.h"
+1 -1
arch/arm/mach-omap1/board-palmtt.c
··· 38 38 #include <linux/platform_data/keypad-omap.h> 39 39 40 40 #include <mach/hardware.h> 41 - #include <mach/usb.h> 41 + #include "usb.h" 42 42 43 43 #include "common.h" 44 44
+1 -1
arch/arm/mach-omap1/board-palmz71.c
··· 40 40 #include <linux/platform_data/keypad-omap.h> 41 41 42 42 #include <mach/hardware.h> 43 - #include <mach/usb.h> 43 + #include "usb.h" 44 44 45 45 #include "common.h" 46 46
+1 -1
arch/arm/mach-omap1/board-sx1.c
··· 38 38 #include "board-sx1.h" 39 39 40 40 #include <mach/hardware.h> 41 - #include <mach/usb.h> 41 + #include "usb.h" 42 42 43 43 #include "common.h" 44 44
+1 -1
arch/arm/mach-omap1/clock_data.c
··· 22 22 #include "soc.h" 23 23 24 24 #include <mach/hardware.h> 25 - #include <mach/usb.h> /* for OTG_BASE */ 25 + #include "usb.h" /* for OTG_BASE */ 26 26 27 27 #include "iomap.h" 28 28 #include "clock.h"
+8 -20
arch/arm/mach-omap1/include/mach/usb.h include/linux/soc/ti/omap1-usb.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef __SOC_TI_OMAP1_USB 3 + #define __SOC_TI_OMAP1_USB 2 4 /* 3 - * FIXME correct answer depends on hmc_mode, 4 - * as does (on omap1) any nonzero value for config->otg port number 5 + * Constants in this file are used all over the place, in platform 6 + * code, as well as the udc, phy and ohci drivers. 7 + * This is not a great design, but unlikely to get fixed after 8 + * such a long time. Don't do this elsewhere. 5 9 */ 6 - #if IS_ENABLED(CONFIG_USB_OMAP) 7 - #define is_usb0_device(config) 1 8 - #else 9 - #define is_usb0_device(config) 0 10 - #endif 11 - 12 - #include <linux/platform_data/usb-omap1.h> 13 - 14 - #if IS_ENABLED(CONFIG_USB_SUPPORT) 15 - void omap1_usb_init(struct omap_usb_config *pdata); 16 - #else 17 - static inline void omap1_usb_init(struct omap_usb_config *pdata) 18 - { 19 - } 20 - #endif 21 10 22 11 #define OMAP1_OTG_BASE 0xfffb0400 23 12 #define OMAP1_UDC_BASE 0xfffb4000 24 - #define OMAP1_OHCI_BASE 0xfffba000 25 13 26 - #define OMAP2_OHCI_BASE 0x4805e000 27 14 #define OMAP2_UDC_BASE 0x4805e200 28 15 #define OMAP2_OTG_BASE 0x4805e300 29 16 #define OTG_BASE OMAP1_OTG_BASE 30 17 #define UDC_BASE OMAP1_UDC_BASE 31 - #define OMAP_OHCI_BASE OMAP1_OHCI_BASE 32 18 33 19 /* 34 20 * OTG and transceiver registers, for OMAPs starting with ARM926 ··· 112 126 # define CONF_USB0_ISOLATE_R (1 << 3) 113 127 # define CONF_USB_PWRDN_DM_R (1 << 2) 114 128 # define CONF_USB_PWRDN_DP_R (1 << 1) 129 + 130 + #endif
+1 -1
arch/arm/mach-omap1/usb.c
··· 17 17 18 18 #include <mach/mux.h> 19 19 20 - #include <mach/usb.h> 20 + #include "usb.h" 21 21 22 22 #include "common.h" 23 23
+25
arch/arm/mach-omap1/usb.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + /* 3 + * fixme correct answer depends on hmc_mode, 4 + * as does (on omap1) any nonzero value for config->otg port number 5 + */ 6 + #include <linux/platform_data/usb-omap1.h> 7 + #include <linux/soc/ti/omap1-usb.h> 8 + 9 + #if IS_ENABLED(CONFIG_USB_OMAP) 10 + #define is_usb0_device(config) 1 11 + #else 12 + #define is_usb0_device(config) 0 13 + #endif 14 + 15 + #if IS_ENABLED(CONFIG_USB_SUPPORT) 16 + void omap1_usb_init(struct omap_usb_config *pdata); 17 + #else 18 + static inline void omap1_usb_init(struct omap_usb_config *pdata) 19 + { 20 + } 21 + #endif 22 + 23 + #define OMAP1_OHCI_BASE 0xfffba000 24 + #define OMAP2_OHCI_BASE 0x4805e000 25 + #define OMAP_OHCI_BASE OMAP1_OHCI_BASE
+2 -1
drivers/usb/gadget/udc/omap_udc.c
··· 40 40 #include <asm/mach-types.h> 41 41 42 42 #include <linux/omap-dma.h> 43 + #include <linux/platform_data/usb-omap1.h> 43 44 44 - #include <mach/usb.h> 45 + #include <linux/soc/ti/omap1-usb.h> 45 46 46 47 #include "omap_udc.h" 47 48
+2 -2
drivers/usb/host/ohci-omap.c
··· 25 25 #include <linux/module.h> 26 26 #include <linux/usb/otg.h> 27 27 #include <linux/platform_device.h> 28 + #include <linux/platform_data/usb-omap1.h> 29 + #include <linux/soc/ti/omap1-usb.h> 28 30 #include <linux/signal.h> 29 31 #include <linux/usb.h> 30 32 #include <linux/usb/hcd.h> ··· 39 37 #include <mach/mux.h> 40 38 41 39 #include <mach/hardware.h> 42 - #include <mach/usb.h> 43 - 44 40 45 41 #define DRIVER_DESC "OHCI OMAP driver" 46 42
+1 -1
drivers/usb/phy/phy-isp1301-omap.c
··· 25 25 26 26 #include <mach/mux.h> 27 27 28 - #include <mach/usb.h> 28 + #include <linux/soc/ti/omap1-usb.h> 29 29 30 30 #undef VERBOSE 31 31