ARM: OMAP2+: Remove unused platform init code and headers
Subsystems (4)
Tony Lindgren
maintainerPATCH 1/1 ARM: OMAP2+: Remove unused platform init code and headers
After converting mach-omap2 to boot with device tree only, we can now remove some more unused platform init code and headers:
- omap4-keypad related functions are no longer needed with with device tree
- board-rx51.h and hsmmc.h are now unused, and board-rx51.c has some unneded headers
- serial.h is no longer needed
- i2c_dev_attr is now set in the driver based on the compatible flag, and fifo_depth is unused
Signed-off-by Tony Lindgren <[email protected]>
---
This depends on all the previously posted patches to make mach-omap2 to boot in device tree mode only.
arch/arm/mach-omap2/am33xx-restart.c +0 -2
@@ -5,8 +5,6 @@* it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#include <linux/kernel.h> -#include <linux/reboot.h> #include "common.h" #include "prm-regbits-33xx.h"
arch/arm/mach-omap2/board-n8x0.c +0 -5
@@ -17,7 +17,6 @@#include <linux/init.h> #include <linux/io.h> #include <linux/irq.h> -#include <linux/stddef.h> #include <linux/i2c.h> #include <linux/spi/spi.h> #include <linux/usb/musb.h>
@@ -26,13 +25,9 @@#include <linux/mfd/menelaus.h> #include <sound/tlv320aic3x.h> -#include <asm/mach/arch.h> -#include <asm/mach-types.h> -#include "common.h" #include "mmc.h" #include "soc.h" -#include "gpmc-onenand.h" #define TUSB6010_ASYNC_CS 1#define TUSB6010_SYNC_CS 4
arch/arm/mach-omap2/board-rx51.h deleted +0 -11
@@ -1,11 +0,0 @@ -/* -* Defines for rx51 boards -*/ - -#ifndef _OMAP_BOARD_RX51_H -#define _OMAP_BOARD_RX51_H - -extern void __init rx51_peripherals_init (void ); -extern void __init rx51_video_mem_init (void ); - -#endif
arch/arm/mach-omap2/common.h +0 -6
@@ -28,18 +28,12 @@#include <linux/irq.h> #include <linux/delay.h> -#include <linux/i2c.h> #include <linux/i2c/twl.h> #include <linux/i2c-omap.h> #include <linux/reboot.h> #include <asm/proc-fns.h> -#include "i2c.h" -#include "serial.h" - -#include "usb.h" -#define OMAP_INTC_START NR_IRQS#if defined(CONFIG_PM ) && defined(CONFIG_ARCH_OMAP2 )
arch/arm/mach-omap2/devices.c +0 -32
@@ -18,7 +18,6 @@#include <linux/slab.h> #include <linux/of.h> #include <linux/pinctrl/machine.h> -#include <linux/platform_data/omap4-keypad.h> #include <linux/platform_data/mailbox-omap.h> #include <asm/mach-types.h>
@@ -29,7 +28,6 @@#include "iomap.h" #include "omap_hwmod.h" #include "omap_device.h" -#include "omap4-keypad.h" #include "soc.h" #include "common.h"
@@ -251,36 +249,6 @@ static inline void omap_init_camera(void)#endif } -int __init omap4_keyboard_init (struct omap4_keypad_platform_data - *sdp4430_keypad_data,struct omap_board_data *bdata) -{ -struct platform_device *pdev; -struct omap_hwmod *oh; -struct omap4_keypad_platform_data *keypad_data; -unsigned int id =-1 ; -char *oh_name ="kbd" ; -char *name ="omap4-keypad" ; - - oh =omap_hwmod_lookup (oh_name); -if (!oh) { -pr_err ("Could not look up %s\n" , oh_name); -return -ENODEV ; - } - - keypad_data = sdp4430_keypad_data; - - pdev =omap_device_build (name, id, oh, keypad_data, -sizeof (struct omap4_keypad_platform_data )); - -if (IS_ERR (pdev)) { -WARN (1 ,"Can't build omap_device for %s:%s.\n" , - name, oh->name); -return PTR_ERR (pdev); - } - -return 0 ; -} -#if defined(CONFIG_OMAP2PLUS_MBOX ) || defined(CONFIG_OMAP2PLUS_MBOX_MODULE )static inline void __init omap_init_mbox (void ) {
arch/arm/mach-omap2/hsmmc.h deleted +0 -53
53 lines not on this page · raw message
arch/arm/mach-omap2/i2c.h +0 -13
@@ -24,19 +24,6 @@#ifndef __MACH_OMAP2_I2C_H#define __MACH_OMAP2_I2C_H -/** -* i2c_dev_attr - OMAP I2C controller device attributes for omap_hwmod -* @fifo_depth: total controller FIFO size (in bytes) -* @flags: differences in hardware support capability -* -* @fifo_depth represents what exists on the hardware, not what is -* actually configured at runtime by the device driver. -*/ -struct omap_i2c_dev_attr { -u8 fifo_depth; -u32 flags; -}; -int omap_i2c_reset (struct omap_hwmod *oh);#endif /* __MACH_OMAP2_I2C_H */
arch/arm/mach-omap2/include/mach/serial.h deleted +0 -66
66 lines not on this page · raw message
arch/arm/mach-omap2/io.c +0 -1
@@ -41,7 +41,6 @@#include "omap-pm.h" #include "sdrc.h" #include "control.h" -#include "serial.h" #include "sram.h" #include "cm2xxx.h" #include "cm3xxx.h"
arch/arm/mach-omap2/omap4-keypad.h deleted +0 -8
@@ -1,8 +0,0 @@ -#ifndef ARCH_ARM_PLAT_OMAP4_KEYPAD_H -#define ARCH_ARM_PLAT_OMAP4_KEYPAD_H - -struct omap_board_data ; - -extern int omap4_keyboard_init (struct omap4_keypad_platform_data *, -struct omap_board_data *); -#endif
arch/arm/mach-omap2/omap_hwmod_2420_data.c +0 -10
@@ -29,7 +29,6 @@#include "prm-regbits-24xx.h" #include "i2c.h" #include "mmc.h" -#include "serial.h" #include "wd_timer.h" /*
@@ -98,13 +97,6 @@ static struct omap_hwmod_class i2c_class = { .reset = &omap_i2c_reset, }; -static struct omap_i2c_dev_attr i2c_dev_attr = { - .flags =OMAP_I2C_FLAG_NO_FIFO | -OMAP_I2C_FLAG_SIMPLE_CLOCK | -OMAP_I2C_FLAG_16BIT_DATA_REG | -OMAP_I2C_FLAG_BUS_SHIFT_2 , -}; -/* I2C1 */ static struct omap_hwmod omap2420_i2c1_hwmod = { .name ="i2c1" ,
@@ -119,7 +111,6 @@ static struct omap_hwmod omap2420_i2c1_hwmod = { }, }, .class = &i2c_class, - .dev_attr = &i2c_dev_attr,/* * From mach-omap2/pm24xx.c: "Putting MPU into the WFI state * while a transfer is active seems to cause the I2C block to
@@ -142,7 +133,6 @@ static struct omap_hwmod omap2420_i2c2_hwmod = { }, }, .class = &i2c_class, - .dev_attr = &i2c_dev_attr, .flags = HWMOD_16BIT_REG, };
arch/arm/mach-omap2/omap_hwmod_2430_data.c +0 -8
@@ -76,12 +76,6 @@ static struct omap_hwmod_class i2c_class = { .reset = &omap_i2c_reset, }; -static struct omap_i2c_dev_attr i2c_dev_attr = { - .fifo_depth =8 ,/* bytes */ - .flags =OMAP_I2C_FLAG_BUS_SHIFT_2 | -OMAP_I2C_FLAG_FORCE_19200_INT_CLK , -}; -/* I2C1 */ static struct omap_hwmod omap2430_i2c1_hwmod = { .name ="i2c1" ,
@@ -105,7 +99,6 @@ static struct omap_hwmod omap2430_i2c1_hwmod = { }, }, .class = &i2c_class, - .dev_attr = &i2c_dev_attr, };/* I2C2 */
@@ -123,7 +116,6 @@ static struct omap_hwmod omap2430_i2c2_hwmod = { }, }, .class = &i2c_class, - .dev_attr = &i2c_dev_attr, };/* gpio5 */
arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c +0 -1
@@ -16,7 +16,6 @@#include "omap_hwmod.h" #include "l3_2xxx.h" #include "l4_2xxx.h" -#include "serial.h" #include "omap_hwmod_common_data.h"
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c +0 -7
@@ -695,10 +695,6 @@ static struct omap_hwmod_class i2c_class = { .reset = &omap_i2c_reset, }; -static struct omap_i2c_dev_attr i2c_dev_attr = { - .flags =OMAP_I2C_FLAG_BUS_SHIFT_NONE , -}; -/* i2c1 */ struct omap_hwmod am33xx_i2c1_hwmod = { .name ="i2c1" ,
@@ -711,7 +707,6 @@ struct omap_hwmod am33xx_i2c1_hwmod = { .modulemode = MODULEMODE_SWCTRL, }, }, - .dev_attr = &i2c_dev_attr, };/* i2c1 */
@@ -726,7 +721,6 @@ struct omap_hwmod am33xx_i2c2_hwmod = { .modulemode = MODULEMODE_SWCTRL, }, }, - .dev_attr = &i2c_dev_attr, };/* i2c3 */
@@ -741,7 +735,6 @@ struct omap_hwmod am33xx_i2c3_hwmod = { .modulemode = MODULEMODE_SWCTRL, }, }, - .dev_attr = &i2c_dev_attr, };/*
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +0 -21
@@ -39,7 +39,6 @@#include "i2c.h" #include "mmc.h" #include "wd_timer.h" -#include "serial.h" /* * OMAP3xxx hardware module integration data
@@ -742,11 +741,6 @@ static struct omap_hwmod omap3xxx_dss_venc_hwmod = { };/* I2C1 */ -static struct omap_i2c_dev_attr i2c1_dev_attr = { - .fifo_depth =8 ,/* bytes */ - .flags =OMAP_I2C_FLAG_BUS_SHIFT_2 , -}; -static struct omap_hwmod omap3xxx_i2c1_hwmod = { .name ="i2c1" , .flags =HWMOD_16BIT_REG |HWMOD_SET_DEFAULT_CLOCKACT ,
@@ -761,15 +755,9 @@ static struct omap_hwmod omap3xxx_i2c1_hwmod = { }, }, .class = &i2c_class, - .dev_attr = &i2c1_dev_attr, };/* I2C2 */ -static struct omap_i2c_dev_attr i2c2_dev_attr = { - .fifo_depth =8 ,/* bytes */ - .flags =OMAP_I2C_FLAG_BUS_SHIFT_2 , -}; -static struct omap_hwmod omap3xxx_i2c2_hwmod = { .name ="i2c2" , .flags =HWMOD_16BIT_REG |HWMOD_SET_DEFAULT_CLOCKACT ,
@@ -784,17 +772,9 @@ static struct omap_hwmod omap3xxx_i2c2_hwmod = { }, }, .class = &i2c_class, - .dev_attr = &i2c2_dev_attr, };/* I2C3 */ -static struct omap_i2c_dev_attr i2c3_dev_attr = { - .fifo_depth =64 ,/* bytes */ - .flags =OMAP_I2C_FLAG_BUS_SHIFT_2 , -}; - - -static struct omap_hwmod omap3xxx_i2c3_hwmod = { .name ="i2c3" , .flags =HWMOD_16BIT_REG |HWMOD_SET_DEFAULT_CLOCKACT ,
@@ -809,7 +789,6 @@ static struct omap_hwmod omap3xxx_i2c3_hwmod = { }, }, .class = &i2c_class, - .dev_attr = &i2c3_dev_attr, };/*
arch/arm/mach-omap2/omap_hwmod_44xx_data.c +0 -8
@@ -1327,10 +1327,6 @@ static struct omap_hwmod_class omap44xx_i2c_hwmod_class = { .reset = &omap_i2c_reset, }; -static struct omap_i2c_dev_attr i2c_dev_attr = { - .flags =OMAP_I2C_FLAG_BUS_SHIFT_NONE , -}; -/* i2c1 */ static struct omap_hwmod omap44xx_i2c1_hwmod = { .name ="i2c1" ,
@@ -1345,7 +1341,6 @@ static struct omap_hwmod omap44xx_i2c1_hwmod = { .modulemode = MODULEMODE_SWCTRL, }, }, - .dev_attr = &i2c_dev_attr, };/* i2c2 */
@@ -1362,7 +1357,6 @@ static struct omap_hwmod omap44xx_i2c2_hwmod = { .modulemode = MODULEMODE_SWCTRL, }, }, - .dev_attr = &i2c_dev_attr, };/* i2c3 */
@@ -1379,7 +1373,6 @@ static struct omap_hwmod omap44xx_i2c3_hwmod = { .modulemode = MODULEMODE_SWCTRL, }, }, - .dev_attr = &i2c_dev_attr, };/* i2c4 */
@@ -1396,7 +1389,6 @@ static struct omap_hwmod omap44xx_i2c4_hwmod = { .modulemode = MODULEMODE_SWCTRL, }, }, - .dev_attr = &i2c_dev_attr, };/*
arch/arm/mach-omap2/omap_hwmod_54xx_data.c +0 -10
@@ -615,11 +615,6 @@ static struct omap_hwmod_class omap54xx_i2c_hwmod_class = { .rev = OMAP_I2C_IP_VERSION_2, }; -/* i2c dev_attr */ -static struct omap_i2c_dev_attr i2c_dev_attr = { - .flags =OMAP_I2C_FLAG_BUS_SHIFT_NONE , -}; -/* i2c1 */ static struct omap_hwmod omap54xx_i2c1_hwmod = { .name ="i2c1" ,
@@ -634,7 +629,6 @@ static struct omap_hwmod omap54xx_i2c1_hwmod = { .modulemode = MODULEMODE_SWCTRL, }, }, - .dev_attr = &i2c_dev_attr, };/* i2c2 */
@@ -651,7 +645,6 @@ static struct omap_hwmod omap54xx_i2c2_hwmod = { .modulemode = MODULEMODE_SWCTRL, }, }, - .dev_attr = &i2c_dev_attr, };/* i2c3 */
@@ -668,7 +661,6 @@ static struct omap_hwmod omap54xx_i2c3_hwmod = { .modulemode = MODULEMODE_SWCTRL, }, }, - .dev_attr = &i2c_dev_attr, };/* i2c4 */
@@ -685,7 +677,6 @@ static struct omap_hwmod omap54xx_i2c4_hwmod = { .modulemode = MODULEMODE_SWCTRL, }, }, - .dev_attr = &i2c_dev_attr, };/* i2c5 */
@@ -702,7 +693,6 @@ static struct omap_hwmod omap54xx_i2c5_hwmod = { .modulemode = MODULEMODE_SWCTRL, }, }, - .dev_attr = &i2c_dev_attr, };/*
arch/arm/mach-omap2/omap_hwmod_7xx_data.c +0 -10
@@ -848,11 +848,6 @@ static struct omap_hwmod_class dra7xx_i2c_hwmod_class = { .rev = OMAP_I2C_IP_VERSION_2, }; -/* i2c dev_attr */ -static struct omap_i2c_dev_attr i2c_dev_attr = { - .flags =OMAP_I2C_FLAG_BUS_SHIFT_NONE , -}; -/* i2c1 */ static struct omap_hwmod dra7xx_i2c1_hwmod = { .name ="i2c1" ,
@@ -867,7 +862,6 @@ static struct omap_hwmod dra7xx_i2c1_hwmod = { .modulemode = MODULEMODE_SWCTRL, }, }, - .dev_attr = &i2c_dev_attr, };/* i2c2 */
@@ -884,7 +878,6 @@ static struct omap_hwmod dra7xx_i2c2_hwmod = { .modulemode = MODULEMODE_SWCTRL, }, }, - .dev_attr = &i2c_dev_attr, };/* i2c3 */
@@ -901,7 +894,6 @@ static struct omap_hwmod dra7xx_i2c3_hwmod = { .modulemode = MODULEMODE_SWCTRL, }, }, - .dev_attr = &i2c_dev_attr, };/* i2c4 */
@@ -918,7 +910,6 @@ static struct omap_hwmod dra7xx_i2c4_hwmod = { .modulemode = MODULEMODE_SWCTRL, }, }, - .dev_attr = &i2c_dev_attr, };/* i2c5 */
@@ -935,7 +926,6 @@ static struct omap_hwmod dra7xx_i2c5_hwmod = { .modulemode = MODULEMODE_SWCTRL, }, }, - .dev_attr = &i2c_dev_attr, };/*
arch/arm/mach-omap2/serial.h deleted +0 -1
@@ -1 +0,0 @@ -#include <mach/serial.h>