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

Commit 0ae26c8c authored by Paul Mundt's avatar Paul Mundt
Browse files

Merge branches 'rmobile/ag5' and 'rmobile/mmcif' into rmobile-latest

Loading
Loading
Loading
Loading
+41 −0
Original line number Original line Diff line number Diff line
@@ -33,6 +33,8 @@
#include <linux/input.h>
#include <linux/input.h>
#include <linux/input/sh_keysc.h>
#include <linux/input/sh_keysc.h>


#include <sound/sh_fsi.h>

#include <mach/hardware.h>
#include <mach/hardware.h>
#include <mach/sh73a0.h>
#include <mach/sh73a0.h>
#include <mach/common.h>
#include <mach/common.h>
@@ -113,9 +115,41 @@ static struct platform_device keysc_device = {
	},
	},
};
};


/* FSI A */
static struct sh_fsi_platform_info fsi_info = {
	.porta_flags = SH_FSI_OUT_SLAVE_MODE	|
		       SH_FSI_IN_SLAVE_MODE	|
		       SH_FSI_OFMT(I2S)		|
		       SH_FSI_IFMT(I2S),
};

static struct resource fsi_resources[] = {
	[0] = {
		.name	= "FSI",
		.start	= 0xEC230000,
		.end	= 0xEC230400 - 1,
		.flags	= IORESOURCE_MEM,
	},
	[1] = {
		.start  = gic_spi(146),
		.flags  = IORESOURCE_IRQ,
	},
};

static struct platform_device fsi_device = {
	.name		= "sh_fsi2",
	.id		= -1,
	.num_resources	= ARRAY_SIZE(fsi_resources),
	.resource	= fsi_resources,
	.dev	= {
		.platform_data	= &fsi_info,
	},
};

static struct platform_device *ag5evm_devices[] __initdata = {
static struct platform_device *ag5evm_devices[] __initdata = {
	&eth_device,
	&eth_device,
	&keysc_device,
	&keysc_device,
	&fsi_device,
};
};


static struct map_desc ag5evm_io_desc[] __initdata = {
static struct map_desc ag5evm_io_desc[] __initdata = {
@@ -195,6 +229,13 @@ static void __init ag5evm_init(void)
	gpio_request(GPIO_PORT145, NULL); /* RESET */
	gpio_request(GPIO_PORT145, NULL); /* RESET */
	gpio_direction_output(GPIO_PORT145, 1);
	gpio_direction_output(GPIO_PORT145, 1);


	/* FSI A */
	gpio_request(GPIO_FN_FSIACK, NULL);
	gpio_request(GPIO_FN_FSIAILR, NULL);
	gpio_request(GPIO_FN_FSIAIBT, NULL);
	gpio_request(GPIO_FN_FSIAISLD, NULL);
	gpio_request(GPIO_FN_FSIAOSLD, NULL);

#ifdef CONFIG_CACHE_L2X0
#ifdef CONFIG_CACHE_L2X0
	/* Shared attribute override enable, 64K*8way */
	/* Shared attribute override enable, 64K*8way */
	l2x0_init(__io(0xf0100000), 0x00460000, 0xc2000fff);
	l2x0_init(__io(0xf0100000), 0x00460000, 0xc2000fff);
+10 −9
Original line number Original line Diff line number Diff line
@@ -51,10 +51,11 @@ static struct clk *main_clks[] = {
	&hp_clk,
	&hp_clk,
};
};


enum { MSTP219,
enum {	MSTP001,
	MSTP001, MSTP116, MSTP207, MSTP206, MSTP204, MSTP203, MSTP202,
	MSTP116,
	MSTP201, MSTP200, MSTP323, MSTP331, MSTP329, MSTP312, MSTP411,
	MSTP219, MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200,
	MSTP410, MSTP403,
	MSTP331, MSTP329, MSTP323,
	MSTP411, MSTP410, MSTP403,
	MSTP_NR };
	MSTP_NR };


#define MSTP(_parent, _reg, _bit, _flags) \
#define MSTP(_parent, _reg, _bit, _flags) \
@@ -62,8 +63,8 @@ enum { MSTP219,


static struct clk mstp_clks[MSTP_NR] = {
static struct clk mstp_clks[MSTP_NR] = {
	[MSTP001] = MSTP(&hp_clk, SMSTPCR0, 1, 0), /* I2C2 */
	[MSTP001] = MSTP(&hp_clk, SMSTPCR0, 1, 0), /* I2C2 */
	[MSTP219] = MSTP(&sub_clk, SMSTPCR2, 19, 0), /* SCIFA7 */
	[MSTP116] = MSTP(&hp_clk, SMSTPCR1, 16, 0), /* I2C0 */
	[MSTP116] = MSTP(&hp_clk, SMSTPCR1, 16, 0), /* I2C0 */
	[MSTP219] = MSTP(&sub_clk, SMSTPCR2, 19, 0), /* SCIFA7 */
	[MSTP207] = MSTP(&sub_clk, SMSTPCR2, 7, 0), /* SCIFA5 */
	[MSTP207] = MSTP(&sub_clk, SMSTPCR2, 7, 0), /* SCIFA5 */
	[MSTP206] = MSTP(&sub_clk, SMSTPCR2, 6, 0), /* SCIFB */
	[MSTP206] = MSTP(&sub_clk, SMSTPCR2, 6, 0), /* SCIFB */
	[MSTP204] = MSTP(&sub_clk, SMSTPCR2, 4, 0), /* SCIFA0 */
	[MSTP204] = MSTP(&sub_clk, SMSTPCR2, 4, 0), /* SCIFA0 */
@@ -74,15 +75,17 @@ static struct clk mstp_clks[MSTP_NR] = {
	[MSTP331] = MSTP(&sub_clk, SMSTPCR3, 31, 0), /* SCIFA6 */
	[MSTP331] = MSTP(&sub_clk, SMSTPCR3, 31, 0), /* SCIFA6 */
	[MSTP329] = MSTP(&r_clk, SMSTPCR3, 29, 0), /* CMT10 */
	[MSTP329] = MSTP(&r_clk, SMSTPCR3, 29, 0), /* CMT10 */
	[MSTP323] = MSTP(&hp_clk, SMSTPCR3, 23, 0), /* I2C1 */
	[MSTP323] = MSTP(&hp_clk, SMSTPCR3, 23, 0), /* I2C1 */
	[MSTP403] = MSTP(&r_clk, SMSTPCR4, 0, 0), /* KEYSC0 */
	[MSTP411] = MSTP(&hp_clk, SMSTPCR4, 11, 0), /* I2C3 */
	[MSTP411] = MSTP(&hp_clk, SMSTPCR4, 11, 0), /* I2C3 */
	[MSTP410] = MSTP(&hp_clk, SMSTPCR4, 10, 0), /* I2C4 */
	[MSTP410] = MSTP(&hp_clk, SMSTPCR4, 10, 0), /* I2C4 */
	[MSTP403] = MSTP(&r_clk, SMSTPCR4, 0, 0), /* KEYSC0 */
};
};


#define CLKDEV_DEV_ID(_id, _clk) { .dev_id = _id, .clk = _clk }
#define CLKDEV_DEV_ID(_id, _clk) { .dev_id = _id, .clk = _clk }


static struct clk_lookup lookups[] = {
static struct clk_lookup lookups[] = {
	/* MSTP32 clocks */
	/* MSTP32 clocks */
	CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* I2C2 */
	CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* I2C0 */
	CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP219]), /* SCIFA7 */
	CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP219]), /* SCIFA7 */
	CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */
	CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */
	CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP206]), /* SCIFB */
	CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP206]), /* SCIFB */
@@ -93,12 +96,10 @@ static struct clk_lookup lookups[] = {
	CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */
	CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */
	CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP331]), /* SCIFA6 */
	CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP331]), /* SCIFA6 */
	CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */
	CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */
	CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC0 */
	CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* I2C0 */
	CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* I2C1 */
	CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* I2C1 */
	CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* I2C2 */
	CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* I2C3 */
	CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* I2C3 */
	CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* I2C4 */
	CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* I2C4 */
	CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC0 */
};
};


void __init sh73a0_clock_init(void)
void __init sh73a0_clock_init(void)
+1 −1
Original line number Original line Diff line number Diff line
@@ -4,7 +4,7 @@


#else /* __ASSEMBLY__ */
#else /* __ASSEMBLY__ */


extern inline void mmcif_update_progress(int nr)
static inline void mmcif_update_progress(int nr)
{
{
}
}


+1 −1
Original line number Original line Diff line number Diff line
@@ -35,7 +35,7 @@
#define HIZCRA		0xa4050158
#define HIZCRA		0xa4050158
#define PGDR		0xa405012c
#define PGDR		0xa405012c


extern inline void mmcif_update_progress(int nr)
static inline void mmcif_update_progress(int nr)
{
{
	/* disable Hi-Z for LED pins */
	/* disable Hi-Z for LED pins */
	__raw_writew(__raw_readw(HIZCRA) & ~(1 << 1), HIZCRA);
	__raw_writew(__raw_readw(HIZCRA) & ~(1 << 1), HIZCRA);
+1 −1
Original line number Original line Diff line number Diff line
@@ -23,7 +23,7 @@


#else /* __ASSEMBLY__ */
#else /* __ASSEMBLY__ */


extern inline void mmcif_update_progress(int nr)
static inline void mmcif_update_progress(int nr)
{
{
}
}


Loading