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

Commit 8f37a0b4 authored by Jamie Iles's avatar Jamie Iles
Browse files

ARM: picoxcell: move io mappings to common.c



Now that we have lost our machine specific ioremap() we just have one
mapping that covers all peripherals.  Move this to common.c to simplify
things a little.

Signed-off-by: default avatarJamie Iles <jamie@jamieiles.com>
parent 98e27a5c
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
obj-y	:= common.o
obj-y	+= time.o
obj-y	+= io.o
+13 −0
Original line number Diff line number Diff line
@@ -16,12 +16,25 @@

#include <asm/mach/arch.h>
#include <asm/hardware/vic.h>
#include <asm/mach/map.h>

#include <mach/map.h>
#include <mach/picoxcell_soc.h>

#include "common.h"

static struct map_desc io_map __initdata = {
	.virtual	= PHYS_TO_IO(PICOXCELL_PERIPH_BASE),
	.pfn		= __phys_to_pfn(PICOXCELL_PERIPH_BASE),
	.length		= PICOXCELL_PERIPH_LENGTH,
	.type		= MT_DEVICE,
};

static void __init picoxcell_map_io(void)
{
	iotable_init(&io_map, 1);
}

static void __init picoxcell_init_machine(void)
{
	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+0 −1
Original line number Diff line number Diff line
@@ -13,6 +13,5 @@
#include <asm/mach/time.h>

extern struct sys_timer picoxcell_timer;
extern void picoxcell_map_io(void);

#endif /* __PICOXCELL_COMMON_H__ */

arch/arm/mach-picoxcell/io.c

deleted100644 → 0
+0 −32
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011 Picochip Ltd., Jamie Iles
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * All enquiries to support@picochip.com
 */
#include <linux/io.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/of.h>

#include <asm/mach/map.h>

#include <mach/map.h>
#include <mach/picoxcell_soc.h>

#include "common.h"

void __init picoxcell_map_io(void)
{
	struct map_desc io_map = {
		.virtual	= PHYS_TO_IO(PICOXCELL_PERIPH_BASE),
		.pfn		= __phys_to_pfn(PICOXCELL_PERIPH_BASE),
		.length		= PICOXCELL_PERIPH_LENGTH,
		.type		= MT_DEVICE,
	};

	iotable_init(&io_map, 1);
}