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

Commit af9081ae authored by Jochen Friedrich's avatar Jochen Friedrich Committed by Samuel Ortiz
Browse files

ARM: sa1100: Refactor mcp-sa11x0 to use platform resources.



Make use of memory resources rather than hardcoded IO adresses.
This is a first step towards DT support.

Signed-off-by: default avatarJochen Friedrich <jochen@scram.de>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 5dd7bf59
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -253,6 +253,17 @@ static void __init assabet_init(void)
	sa11x0_register_mtd(&assabet_flash_data, assabet_flash_resources,
			    ARRAY_SIZE(assabet_flash_resources));
	sa11x0_register_irda(&assabet_irda_data);

	/*
	 * Setup the PPC unit correctly.
	 */
	PPDR &= ~PPC_RXD4;
	PPDR |= PPC_TXD4 | PPC_SCLK | PPC_SFRM;
	PSDR |= PPC_RXD4;
	PSDR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM);
	PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM);

	ASSABET_BCR_set(ASSABET_BCR_CODEC_RST);
	sa11x0_register_mcp(&assabet_mcp_data);
}

+10 −0
Original line number Diff line number Diff line
@@ -131,6 +131,16 @@ static void __init cerf_init(void)
{
	platform_add_devices(cerf_devices, ARRAY_SIZE(cerf_devices));
	sa11x0_register_mtd(&cerf_flash_data, &cerf_flash_resource, 1);

	/*
	 * Setup the PPC unit correctly.
	 */
	PPDR &= ~PPC_RXD4;
	PPDR |= PPC_TXD4 | PPC_SCLK | PPC_SFRM;
	PSDR |= PPC_RXD4;
	PSDR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM);
	PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM);

	sa11x0_register_mcp(&cerf_mcp_data);
}

+10 −0
Original line number Diff line number Diff line
@@ -357,6 +357,16 @@ static void __init collie_init(void)

	sa11x0_register_mtd(&collie_flash_data, collie_flash_resources,
			    ARRAY_SIZE(collie_flash_resources));

	/*
	 * Setup the PPC unit correctly.
	 */
	PPDR &= ~PPC_RXD4;
	PPDR |= PPC_TXD4 | PPC_SCLK | PPC_SFRM;
	PSDR |= PPC_RXD4;
	PSDR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM);
	PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM);

	sa11x0_register_mcp(&collie_mcp_data);

	sharpsl_save_param();
+6 −1
Original line number Diff line number Diff line
@@ -206,10 +206,15 @@ static struct platform_device sa11x0uart3_device = {
static struct resource sa11x0mcp_resources[] = {
	[0] = {
		.start	= __PREG(Ser4MCCR0),
		.end	= __PREG(Ser4MCCR0) + 0xffff,
		.end	= __PREG(Ser4MCCR0) + 0x1C - 1,
		.flags	= IORESOURCE_MEM,
	},
	[1] = {
		.start	= __PREG(Ser4MCCR1),
		.end	= __PREG(Ser4MCCR1) + 0x4 - 1,
		.flags	= IORESOURCE_MEM,
	},
	[2] = {
		.start	= IRQ_Ser4MCP,
		.end	= IRQ_Ser4MCP,
		.flags	= IORESOURCE_IRQ,
+9 −0
Original line number Diff line number Diff line
@@ -29,6 +29,15 @@ static struct mcp_plat_data lart_mcp_data = {

static void __init lart_init(void)
{
	/*
	 * Setup the PPC unit correctly.
	 */
	PPDR &= ~PPC_RXD4;
	PPDR |= PPC_TXD4 | PPC_SCLK | PPC_SFRM;
	PSDR |= PPC_RXD4;
	PSDR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM);
	PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM);

	sa11x0_register_mcp(&lart_mcp_data);
}

Loading