You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge tag 'omap-for-v3.8/cleanup-headers-signed' into omap-for-v3.8/cleanup-headers-serial-take2
This is the first set of omap cleanup patches for v3.8 merge window to remove most of the remaining plat includes to get us closer to ARM common zImage support. To avoid a huge amount of trivial merge conflicts with includes, this branch is based on several small topic branches coordinated with the driver subsystem maintainers. These branches are based on v3.7-rc1 and can also be merged into the related driver subsystem branches as needed: omap-for-v3.8/cleanup-headers-prepare few trivial driver changes omap-for-v3.8/cleanup-headers-dma move of the DMA header omap-for-v3.8/cleanup-headers-gpmc GPMC and MTD changes omap-for-v3.8/cleanup-headers-mmc MMC related changes omap-for-v3.8/cleanup-headers-dss DSS related changes omap-for-v3.8/cleanup-headers-asoc ASoC related changes Note that for the dma-omap.h, it was decided that it should be is completed. For the related discussion, please see: https://patchwork.kernel.org/patch/1519591/# After these patches we still have a few plat headers remaining that will be handled in later pull requests.
This commit is contained in:
@@ -625,7 +625,6 @@ MACHINE_START(AMS_DELTA, "Amstrad E3 (Delta)")
|
||||
.atag_offset = 0x100,
|
||||
.map_io = ams_delta_map_io,
|
||||
.init_early = omap1_init_early,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap1_init_irq,
|
||||
.init_machine = ams_delta_init,
|
||||
.init_late = ams_delta_init_late,
|
||||
|
||||
@@ -27,10 +27,10 @@
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <plat/tc.h>
|
||||
#include <mach/tc.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/flash.h>
|
||||
#include <plat/fpga.h>
|
||||
#include <../plat-omap/fpga.h>
|
||||
#include <linux/platform_data/keypad-omap.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
@@ -123,9 +123,9 @@ static struct resource smc91x_resources[] = {
|
||||
|
||||
static void __init fsample_init_smc91x(void)
|
||||
{
|
||||
fpga_write(1, H2P2_DBG_FPGA_LAN_RESET);
|
||||
__raw_writeb(1, H2P2_DBG_FPGA_LAN_RESET);
|
||||
mdelay(50);
|
||||
fpga_write(fpga_read(H2P2_DBG_FPGA_LAN_RESET) & ~1,
|
||||
__raw_writeb(__raw_readb(H2P2_DBG_FPGA_LAN_RESET) & ~1,
|
||||
H2P2_DBG_FPGA_LAN_RESET);
|
||||
mdelay(50);
|
||||
}
|
||||
@@ -362,7 +362,6 @@ MACHINE_START(OMAP_FSAMPLE, "OMAP730 F-Sample")
|
||||
.atag_offset = 0x100,
|
||||
.map_io = omap_fsample_map_io,
|
||||
.init_early = omap1_init_early,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap1_init_irq,
|
||||
.init_machine = omap_fsample_init,
|
||||
.init_late = omap1_init_late,
|
||||
|
||||
@@ -81,7 +81,6 @@ MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710")
|
||||
.atag_offset = 0x100,
|
||||
.map_io = omap16xx_map_io,
|
||||
.init_early = omap1_init_early,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap1_init_irq,
|
||||
.init_machine = omap_generic_init,
|
||||
.init_late = omap1_init_late,
|
||||
|
||||
@@ -13,12 +13,11 @@
|
||||
*/
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <linux/platform_data/gpio-omap.h>
|
||||
#include <linux/i2c/tps65010.h>
|
||||
|
||||
#include <plat/mmc.h>
|
||||
|
||||
#include "board-h2.h"
|
||||
#include "mmc.h"
|
||||
|
||||
#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/mux.h>
|
||||
#include <plat/dma.h>
|
||||
#include <plat/tc.h>
|
||||
#include <plat-omap/dma-omap.h>
|
||||
#include <mach/tc.h>
|
||||
#include <mach/irda.h>
|
||||
#include <linux/platform_data/keypad-omap.h>
|
||||
#include <mach/flash.h>
|
||||
@@ -50,6 +50,7 @@
|
||||
|
||||
#include "common.h"
|
||||
#include "board-h2.h"
|
||||
#include "dma.h"
|
||||
|
||||
/* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */
|
||||
#define OMAP1610_ETHR_START 0x04000300
|
||||
@@ -458,7 +459,6 @@ MACHINE_START(OMAP_H2, "TI-H2")
|
||||
.atag_offset = 0x100,
|
||||
.map_io = omap16xx_map_io,
|
||||
.init_early = omap1_init_early,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap1_init_irq,
|
||||
.init_machine = h2_init,
|
||||
.init_late = omap1_init_late,
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
|
||||
#include <linux/i2c/tps65010.h>
|
||||
|
||||
#include <plat/mmc.h>
|
||||
|
||||
#include "board-h3.h"
|
||||
#include "mmc.h"
|
||||
|
||||
#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
|
||||
|
||||
|
||||
@@ -41,9 +41,9 @@
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/mux.h>
|
||||
#include <plat/tc.h>
|
||||
#include <mach/tc.h>
|
||||
#include <linux/platform_data/keypad-omap.h>
|
||||
#include <plat/dma.h>
|
||||
#include <plat-omap/dma-omap.h>
|
||||
#include <mach/flash.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
@@ -452,7 +452,6 @@ MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board")
|
||||
.atag_offset = 0x100,
|
||||
.map_io = omap16xx_map_io,
|
||||
.init_early = omap1_init_early,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap1_init_irq,
|
||||
.init_machine = h3_init,
|
||||
.init_late = omap1_init_late,
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include <asm/mach/arch.h>
|
||||
|
||||
#include <mach/omap7xx.h>
|
||||
#include <plat/mmc.h>
|
||||
#include "mmc.h"
|
||||
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/usb.h>
|
||||
@@ -600,7 +600,6 @@ MACHINE_START(HERALD, "HTC Herald")
|
||||
.atag_offset = 0x100,
|
||||
.map_io = htcherald_map_io,
|
||||
.init_early = omap1_init_early,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap1_init_irq,
|
||||
.init_machine = htcherald_init,
|
||||
.init_late = omap1_init_late,
|
||||
|
||||
@@ -33,16 +33,16 @@
|
||||
|
||||
#include <mach/mux.h>
|
||||
#include <mach/flash.h>
|
||||
#include <plat/fpga.h>
|
||||
#include <plat/tc.h>
|
||||
#include <../plat-omap/fpga.h>
|
||||
#include <mach/tc.h>
|
||||
#include <linux/platform_data/keypad-omap.h>
|
||||
#include <plat/mmc.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/usb.h>
|
||||
|
||||
#include "iomap.h"
|
||||
#include "common.h"
|
||||
#include "mmc.h"
|
||||
|
||||
/* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */
|
||||
#define INNOVATOR1610_ETHR_START 0x04000300
|
||||
@@ -215,7 +215,7 @@ static struct platform_device *innovator1510_devices[] __initdata = {
|
||||
|
||||
static int innovator_get_pendown_state(void)
|
||||
{
|
||||
return !(fpga_read(OMAP1510_FPGA_TOUCHSCREEN) & (1 << 5));
|
||||
return !(__raw_readb(OMAP1510_FPGA_TOUCHSCREEN) & (1 << 5));
|
||||
}
|
||||
|
||||
static const struct ads7846_platform_data innovator1510_ts_info = {
|
||||
@@ -279,7 +279,7 @@ static struct platform_device *innovator1610_devices[] __initdata = {
|
||||
static void __init innovator_init_smc91x(void)
|
||||
{
|
||||
if (cpu_is_omap1510()) {
|
||||
fpga_write(fpga_read(OMAP1510_FPGA_RST) & ~1,
|
||||
__raw_writeb(__raw_readb(OMAP1510_FPGA_RST) & ~1,
|
||||
OMAP1510_FPGA_RST);
|
||||
udelay(750);
|
||||
} else {
|
||||
@@ -335,10 +335,10 @@ static int mmc_set_power(struct device *dev, int slot, int power_on,
|
||||
int vdd)
|
||||
{
|
||||
if (power_on)
|
||||
fpga_write(fpga_read(OMAP1510_FPGA_POWER) | (1 << 3),
|
||||
__raw_writeb(__raw_readb(OMAP1510_FPGA_POWER) | (1 << 3),
|
||||
OMAP1510_FPGA_POWER);
|
||||
else
|
||||
fpga_write(fpga_read(OMAP1510_FPGA_POWER) & ~(1 << 3),
|
||||
__raw_writeb(__raw_readb(OMAP1510_FPGA_POWER) & ~(1 << 3),
|
||||
OMAP1510_FPGA_POWER);
|
||||
|
||||
return 0;
|
||||
@@ -390,14 +390,14 @@ static void __init innovator_init(void)
|
||||
omap_cfg_reg(UART3_TX);
|
||||
omap_cfg_reg(UART3_RX);
|
||||
|
||||
reg = fpga_read(OMAP1510_FPGA_POWER);
|
||||
reg = __raw_readb(OMAP1510_FPGA_POWER);
|
||||
reg |= OMAP1510_FPGA_PCR_COM1_EN;
|
||||
fpga_write(reg, OMAP1510_FPGA_POWER);
|
||||
__raw_writeb(reg, OMAP1510_FPGA_POWER);
|
||||
udelay(10);
|
||||
|
||||
reg = fpga_read(OMAP1510_FPGA_POWER);
|
||||
reg = __raw_readb(OMAP1510_FPGA_POWER);
|
||||
reg |= OMAP1510_FPGA_PCR_COM2_EN;
|
||||
fpga_write(reg, OMAP1510_FPGA_POWER);
|
||||
__raw_writeb(reg, OMAP1510_FPGA_POWER);
|
||||
udelay(10);
|
||||
|
||||
platform_add_devices(innovator1510_devices, ARRAY_SIZE(innovator1510_devices));
|
||||
@@ -437,6 +437,7 @@ static void __init innovator_init(void)
|
||||
*/
|
||||
static void __init innovator_map_io(void)
|
||||
{
|
||||
#ifdef CONFIG_ARCH_OMAP15XX
|
||||
omap15xx_map_io();
|
||||
|
||||
iotable_init(innovator1510_io_desc, ARRAY_SIZE(innovator1510_io_desc));
|
||||
@@ -444,9 +445,10 @@ static void __init innovator_map_io(void)
|
||||
|
||||
/* Dump the Innovator FPGA rev early - useful info for support. */
|
||||
pr_debug("Innovator FPGA Rev %d.%d Board Rev %d\n",
|
||||
fpga_read(OMAP1510_FPGA_REV_HIGH),
|
||||
fpga_read(OMAP1510_FPGA_REV_LOW),
|
||||
fpga_read(OMAP1510_FPGA_BOARD_REV));
|
||||
__raw_readb(OMAP1510_FPGA_REV_HIGH),
|
||||
__raw_readb(OMAP1510_FPGA_REV_LOW),
|
||||
__raw_readb(OMAP1510_FPGA_BOARD_REV));
|
||||
#endif
|
||||
}
|
||||
|
||||
MACHINE_START(OMAP_INNOVATOR, "TI-Innovator")
|
||||
@@ -454,7 +456,6 @@ MACHINE_START(OMAP_INNOVATOR, "TI-Innovator")
|
||||
.atag_offset = 0x100,
|
||||
.map_io = innovator_map_io,
|
||||
.init_early = omap1_init_early,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap1_init_irq,
|
||||
.init_machine = innovator_init,
|
||||
.init_late = omap1_init_late,
|
||||
|
||||
@@ -29,13 +29,13 @@
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/mux.h>
|
||||
#include <plat/mmc.h>
|
||||
#include <plat/clock.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/usb.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "clock.h"
|
||||
#include "mmc.h"
|
||||
|
||||
#define ADS7846_PENDOWN_GPIO 15
|
||||
|
||||
@@ -251,7 +251,6 @@ MACHINE_START(NOKIA770, "Nokia 770")
|
||||
.atag_offset = 0x100,
|
||||
.map_io = omap16xx_map_io,
|
||||
.init_early = omap1_init_early,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap1_init_irq,
|
||||
.init_machine = omap_nokia770_init,
|
||||
.init_late = omap1_init_late,
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
#include <mach/flash.h>
|
||||
#include <mach/mux.h>
|
||||
#include <plat/tc.h>
|
||||
#include <mach/tc.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/usb.h>
|
||||
@@ -606,7 +606,6 @@ MACHINE_START(OMAP_OSK, "TI-OSK")
|
||||
.atag_offset = 0x100,
|
||||
.map_io = omap16xx_map_io,
|
||||
.init_early = omap1_init_early,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap1_init_irq,
|
||||
.init_machine = osk_init,
|
||||
.init_late = omap1_init_late,
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
|
||||
#include <mach/flash.h>
|
||||
#include <mach/mux.h>
|
||||
#include <plat/tc.h>
|
||||
#include <plat/dma.h>
|
||||
#include <mach/tc.h>
|
||||
#include <plat-omap/dma-omap.h>
|
||||
#include <mach/irda.h>
|
||||
#include <linux/platform_data/keypad-omap.h>
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include <mach/usb.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "dma.h"
|
||||
|
||||
#define PALMTE_USBDETECT_GPIO 0
|
||||
#define PALMTE_USB_OR_DC_GPIO 1
|
||||
@@ -264,7 +265,6 @@ MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E")
|
||||
.atag_offset = 0x100,
|
||||
.map_io = omap15xx_map_io,
|
||||
.init_early = omap1_init_early,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap1_init_irq,
|
||||
.init_machine = omap_palmte_init,
|
||||
.init_late = omap1_init_late,
|
||||
|
||||
@@ -28,16 +28,16 @@
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/ads7846.h>
|
||||
#include <linux/platform_data/omap1_bl.h>
|
||||
#include <linux/platform_data/leds-omap.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <plat/led.h>
|
||||
#include <mach/flash.h>
|
||||
#include <mach/mux.h>
|
||||
#include <plat/dma.h>
|
||||
#include <plat/tc.h>
|
||||
#include <plat-omap/dma-omap.h>
|
||||
#include <mach/tc.h>
|
||||
#include <mach/irda.h>
|
||||
#include <linux/platform_data/keypad-omap.h>
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include <mach/usb.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "dma.h"
|
||||
|
||||
#define PALMTT_USBDETECT_GPIO 0
|
||||
#define PALMTT_CABLE_GPIO 1
|
||||
@@ -310,7 +311,6 @@ MACHINE_START(OMAP_PALMTT, "OMAP1510 based Palm Tungsten|T")
|
||||
.atag_offset = 0x100,
|
||||
.map_io = omap15xx_map_io,
|
||||
.init_early = omap1_init_early,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap1_init_irq,
|
||||
.init_machine = omap_palmtt_init,
|
||||
.init_late = omap1_init_late,
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
|
||||
#include <mach/flash.h>
|
||||
#include <mach/mux.h>
|
||||
#include <plat/dma.h>
|
||||
#include <plat/tc.h>
|
||||
#include <plat-omap/dma-omap.h>
|
||||
#include <mach/tc.h>
|
||||
#include <mach/irda.h>
|
||||
#include <linux/platform_data/keypad-omap.h>
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#include <mach/usb.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "dma.h"
|
||||
|
||||
#define PALMZ71_USBDETECT_GPIO 0
|
||||
#define PALMZ71_PENIRQ_GPIO 6
|
||||
@@ -326,7 +327,6 @@ MACHINE_START(OMAP_PALMZ71, "OMAP310 based Palm Zire71")
|
||||
.atag_offset = 0x100,
|
||||
.map_io = omap15xx_map_io,
|
||||
.init_early = omap1_init_early,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap1_init_irq,
|
||||
.init_machine = omap_palmz71_init,
|
||||
.init_late = omap1_init_late,
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <plat/tc.h>
|
||||
#include <mach/tc.h>
|
||||
#include <mach/mux.h>
|
||||
#include <plat/fpga.h>
|
||||
#include <../plat-omap/fpga.h>
|
||||
#include <mach/flash.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
@@ -231,9 +231,9 @@ static struct omap_lcd_config perseus2_lcd_config __initdata = {
|
||||
|
||||
static void __init perseus2_init_smc91x(void)
|
||||
{
|
||||
fpga_write(1, H2P2_DBG_FPGA_LAN_RESET);
|
||||
__raw_writeb(1, H2P2_DBG_FPGA_LAN_RESET);
|
||||
mdelay(50);
|
||||
fpga_write(fpga_read(H2P2_DBG_FPGA_LAN_RESET) & ~1,
|
||||
__raw_writeb(__raw_readb(H2P2_DBG_FPGA_LAN_RESET) & ~1,
|
||||
H2P2_DBG_FPGA_LAN_RESET);
|
||||
mdelay(50);
|
||||
}
|
||||
@@ -324,7 +324,6 @@ MACHINE_START(OMAP_PERSEUS2, "OMAP730 Perseus2")
|
||||
.atag_offset = 0x100,
|
||||
.map_io = omap_perseus2_map_io,
|
||||
.init_early = omap1_init_early,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap1_init_irq,
|
||||
.init_machine = omap_perseus2_init,
|
||||
.init_late = omap1_init_late,
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <plat/mmc.h>
|
||||
#include <mach/board-sx1.h>
|
||||
|
||||
#include "mmc.h"
|
||||
|
||||
#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
|
||||
|
||||
static int mmc_set_power(struct device *dev, int slot, int power_on,
|
||||
|
||||
@@ -36,15 +36,16 @@
|
||||
|
||||
#include <mach/flash.h>
|
||||
#include <mach/mux.h>
|
||||
#include <plat/dma.h>
|
||||
#include <plat-omap/dma-omap.h>
|
||||
#include <mach/irda.h>
|
||||
#include <plat/tc.h>
|
||||
#include <mach/tc.h>
|
||||
#include <mach/board-sx1.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/usb.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "dma.h"
|
||||
|
||||
/* Write to I2C device */
|
||||
int sx1_i2c_write_byte(u8 devaddr, u8 regoffset, u8 value)
|
||||
@@ -403,7 +404,6 @@ MACHINE_START(SX1, "OMAP310 based Siemens SX1")
|
||||
.atag_offset = 0x100,
|
||||
.map_io = omap15xx_map_io,
|
||||
.init_early = omap1_init_early,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap1_init_irq,
|
||||
.init_machine = omap_sx1_init,
|
||||
.init_late = omap1_init_late,
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <mach/board-voiceblue.h>
|
||||
#include <mach/flash.h>
|
||||
#include <mach/mux.h>
|
||||
#include <plat/tc.h>
|
||||
#include <mach/tc.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/usb.h>
|
||||
@@ -286,7 +286,6 @@ MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910")
|
||||
.atag_offset = 0x100,
|
||||
.map_io = omap15xx_map_io,
|
||||
.init_early = omap1_init_early,
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap1_init_irq,
|
||||
.init_machine = voiceblue_init,
|
||||
.init_late = omap1_init_late,
|
||||
|
||||
+502
-4
File diff suppressed because it is too large
Load Diff
+177
-1
@@ -14,8 +14,184 @@
|
||||
#define __ARCH_ARM_MACH_OMAP1_CLOCK_H
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/list.h>
|
||||
|
||||
#include <plat/clock.h>
|
||||
#include <linux/clkdev.h>
|
||||
|
||||
struct module;
|
||||
struct clk;
|
||||
|
||||
struct omap_clk {
|
||||
u16 cpu;
|
||||
struct clk_lookup lk;
|
||||
};
|
||||
|
||||
#define CLK(dev, con, ck, cp) \
|
||||
{ \
|
||||
.cpu = cp, \
|
||||
.lk = { \
|
||||
.dev_id = dev, \
|
||||
.con_id = con, \
|
||||
.clk = ck, \
|
||||
}, \
|
||||
}
|
||||
|
||||
/* Platform flags for the clkdev-OMAP integration code */
|
||||
#define CK_310 (1 << 0)
|
||||
#define CK_7XX (1 << 1) /* 7xx, 850 */
|
||||
#define CK_1510 (1 << 2)
|
||||
#define CK_16XX (1 << 3) /* 16xx, 17xx, 5912 */
|
||||
#define CK_1710 (1 << 4) /* 1710 extra for rate selection */
|
||||
|
||||
|
||||
/* Temporary, needed during the common clock framework conversion */
|
||||
#define __clk_get_name(clk) (clk->name)
|
||||
#define __clk_get_parent(clk) (clk->parent)
|
||||
#define __clk_get_rate(clk) (clk->rate)
|
||||
|
||||
/**
|
||||
* struct clkops - some clock function pointers
|
||||
* @enable: fn ptr that enables the current clock in hardware
|
||||
* @disable: fn ptr that enables the current clock in hardware
|
||||
* @find_idlest: function returning the IDLEST register for the clock's IP blk
|
||||
* @find_companion: function returning the "companion" clk reg for the clock
|
||||
* @allow_idle: fn ptr that enables autoidle for the current clock in hardware
|
||||
* @deny_idle: fn ptr that disables autoidle for the current clock in hardware
|
||||
*
|
||||
* A "companion" clk is an accompanying clock to the one being queried
|
||||
* that must be enabled for the IP module connected to the clock to
|
||||
* become accessible by the hardware. Neither @find_idlest nor
|
||||
* @find_companion should be needed; that information is IP
|
||||
* block-specific; the hwmod code has been created to handle this, but
|
||||
* until hwmod data is ready and drivers have been converted to use PM
|
||||
* runtime calls in place of clk_enable()/clk_disable(), @find_idlest and
|
||||
* @find_companion must, unfortunately, remain.
|
||||
*/
|
||||
struct clkops {
|
||||
int (*enable)(struct clk *);
|
||||
void (*disable)(struct clk *);
|
||||
void (*find_idlest)(struct clk *, void __iomem **,
|
||||
u8 *, u8 *);
|
||||
void (*find_companion)(struct clk *, void __iomem **,
|
||||
u8 *);
|
||||
void (*allow_idle)(struct clk *);
|
||||
void (*deny_idle)(struct clk *);
|
||||
};
|
||||
|
||||
/*
|
||||
* struct clk.flags possibilities
|
||||
*
|
||||
* XXX document the rest of the clock flags here
|
||||
*
|
||||
* CLOCK_CLKOUTX2: (OMAP4 only) DPLL CLKOUT and CLKOUTX2 GATE_CTRL
|
||||
* bits share the same register. This flag allows the
|
||||
* omap4_dpllmx*() code to determine which GATE_CTRL bit field
|
||||
* should be used. This is a temporary solution - a better approach
|
||||
* would be to associate clock type-specific data with the clock,
|
||||
* similar to the struct dpll_data approach.
|
||||
*/
|
||||
#define ENABLE_REG_32BIT (1 << 0) /* Use 32-bit access */
|
||||
#define CLOCK_IDLE_CONTROL (1 << 1)
|
||||
#define CLOCK_NO_IDLE_PARENT (1 << 2)
|
||||
#define ENABLE_ON_INIT (1 << 3) /* Enable upon framework init */
|
||||
#define INVERT_ENABLE (1 << 4) /* 0 enables, 1 disables */
|
||||
#define CLOCK_CLKOUTX2 (1 << 5)
|
||||
|
||||
/**
|
||||
* struct clk - OMAP struct clk
|
||||
* @node: list_head connecting this clock into the full clock list
|
||||
* @ops: struct clkops * for this clock
|
||||
* @name: the name of the clock in the hardware (used in hwmod data and debug)
|
||||
* @parent: pointer to this clock's parent struct clk
|
||||
* @children: list_head connecting to the child clks' @sibling list_heads
|
||||
* @sibling: list_head connecting this clk to its parent clk's @children
|
||||
* @rate: current clock rate
|
||||
* @enable_reg: register to write to enable the clock (see @enable_bit)
|
||||
* @recalc: fn ptr that returns the clock's current rate
|
||||
* @set_rate: fn ptr that can change the clock's current rate
|
||||
* @round_rate: fn ptr that can round the clock's current rate
|
||||
* @init: fn ptr to do clock-specific initialization
|
||||
* @enable_bit: bitshift to write to enable/disable the clock (see @enable_reg)
|
||||
* @usecount: number of users that have requested this clock to be enabled
|
||||
* @fixed_div: when > 0, this clock's rate is its parent's rate / @fixed_div
|
||||
* @flags: see "struct clk.flags possibilities" above
|
||||
* @rate_offset: bitshift for rate selection bitfield (OMAP1 only)
|
||||
* @src_offset: bitshift for source selection bitfield (OMAP1 only)
|
||||
*
|
||||
* XXX @rate_offset, @src_offset should probably be removed and OMAP1
|
||||
* clock code converted to use clksel.
|
||||
*
|
||||
* XXX @usecount is poorly named. It should be "enable_count" or
|
||||
* something similar. "users" in the description refers to kernel
|
||||
* code (core code or drivers) that have called clk_enable() and not
|
||||
* yet called clk_disable(); the usecount of parent clocks is also
|
||||
* incremented by the clock code when clk_enable() is called on child
|
||||
* clocks and decremented by the clock code when clk_disable() is
|
||||
* called on child clocks.
|
||||
*
|
||||
* XXX @clkdm, @usecount, @children, @sibling should be marked for
|
||||
* internal use only.
|
||||
*
|
||||
* @children and @sibling are used to optimize parent-to-child clock
|
||||
* tree traversals. (child-to-parent traversals use @parent.)
|
||||
*
|
||||
* XXX The notion of the clock's current rate probably needs to be
|
||||
* separated from the clock's target rate.
|
||||
*/
|
||||
struct clk {
|
||||
struct list_head node;
|
||||
const struct clkops *ops;
|
||||
const char *name;
|
||||
struct clk *parent;
|
||||
struct list_head children;
|
||||
struct list_head sibling; /* node for children */
|
||||
unsigned long rate;
|
||||
void __iomem *enable_reg;
|
||||
unsigned long (*recalc)(struct clk *);
|
||||
int (*set_rate)(struct clk *, unsigned long);
|
||||
long (*round_rate)(struct clk *, unsigned long);
|
||||
void (*init)(struct clk *);
|
||||
u8 enable_bit;
|
||||
s8 usecount;
|
||||
u8 fixed_div;
|
||||
u8 flags;
|
||||
u8 rate_offset;
|
||||
u8 src_offset;
|
||||
#if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS)
|
||||
struct dentry *dent; /* For visible tree hierarchy */
|
||||
#endif
|
||||
};
|
||||
|
||||
struct clk_functions {
|
||||
int (*clk_enable)(struct clk *clk);
|
||||
void (*clk_disable)(struct clk *clk);
|
||||
long (*clk_round_rate)(struct clk *clk, unsigned long rate);
|
||||
int (*clk_set_rate)(struct clk *clk, unsigned long rate);
|
||||
int (*clk_set_parent)(struct clk *clk, struct clk *parent);
|
||||
void (*clk_allow_idle)(struct clk *clk);
|
||||
void (*clk_deny_idle)(struct clk *clk);
|
||||
void (*clk_disable_unused)(struct clk *clk);
|
||||
};
|
||||
|
||||
extern int mpurate;
|
||||
|
||||
extern int clk_init(struct clk_functions *custom_clocks);
|
||||
extern void clk_preinit(struct clk *clk);
|
||||
extern int clk_register(struct clk *clk);
|
||||
extern void clk_reparent(struct clk *child, struct clk *parent);
|
||||
extern void clk_unregister(struct clk *clk);
|
||||
extern void propagate_rate(struct clk *clk);
|
||||
extern void recalculate_root_clocks(void);
|
||||
extern unsigned long followparent_recalc(struct clk *clk);
|
||||
extern void clk_enable_init_clocks(void);
|
||||
unsigned long omap_fixed_divisor_recalc(struct clk *clk);
|
||||
extern struct clk *omap_clk_get_by_name(const char *name);
|
||||
extern int omap_clk_enable_autoidle_all(void);
|
||||
extern int omap_clk_disable_autoidle_all(void);
|
||||
|
||||
extern const struct clkops clkops_null;
|
||||
|
||||
extern struct clk dummy_ck;
|
||||
|
||||
int omap1_clk_init(void);
|
||||
void omap1_clk_late_init(void);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user