Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c98dc6b authored by Tony Lindgren's avatar Tony Lindgren
Browse files

ARM: OMAP: Make plat/fpga.h local to arch/arm/plat-omap



There's no need to have this file in plat/fpga.h. We can
make it local to plat-omap replacing fpga_read/write
functions directly with readb/writeb as that's how
they are already defined in fpga.h.

Note that 2420 based H4 is also using the fpga, so let's
keep the led support around in plat-omap until we flip
over mach-omap2 to device tree.

Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: Felipe Balbi <balbi@ti.com>
Cc: linux-usb@vger.kernel.org
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 6832c955
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@
#include <plat/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);
}
+14 −12
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@

#include <mach/mux.h>
#include <mach/flash.h>
#include <plat/fpga.h>
#include <../plat-omap/fpga.h>
#include <plat/tc.h>
#include <linux/platform_data/keypad-omap.h>

@@ -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")
+3 −3
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@

#include <plat/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);
}
+1 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ static inline void omap7xx_map_io(void)
#endif

#ifdef CONFIG_ARCH_OMAP15XX
void omap1510_fpga_init_irq(void);
void omap15xx_map_io(void);
#else
static inline void omap15xx_map_io(void)
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@
#include <asm/irq.h>
#include <asm/mach/irq.h>

#include <plat/fpga.h>
#include <../plat-omap/fpga.h>

#include <mach/hardware.h>

Loading