Linus Walleij | bb3cee2 | 2009-04-23 10:22:13 +0100 | [diff] [blame] | 1 | /* |
| 2 | * |
| 3 | * arch/arm/mach-u300/u300.c |
| 4 | * |
| 5 | * |
| 6 | * Copyright (C) 2006-2009 ST-Ericsson AB |
| 7 | * License terms: GNU General Public License (GPL) version 2 |
| 8 | * Platform machine definition. |
| 9 | * Author: Linus Walleij <linus.walleij@stericsson.com> |
| 10 | */ |
| 11 | #include <linux/kernel.h> |
| 12 | #include <linux/init.h> |
| 13 | #include <linux/mm.h> |
| 14 | #include <linux/sched.h> |
| 15 | #include <linux/interrupt.h> |
| 16 | #include <linux/ioport.h> |
Russell King | 8d717a5 | 2010-05-22 19:47:18 +0100 | [diff] [blame] | 17 | #include <linux/memblock.h> |
Linus Walleij | bb3cee2 | 2009-04-23 10:22:13 +0100 | [diff] [blame] | 18 | #include <linux/platform_device.h> |
| 19 | #include <linux/io.h> |
| 20 | #include <mach/hardware.h> |
| 21 | #include <mach/platform.h> |
Linus Walleij | bb3cee2 | 2009-04-23 10:22:13 +0100 | [diff] [blame] | 22 | #include <asm/mach-types.h> |
| 23 | #include <asm/mach/arch.h> |
Russell King | f4117ac | 2011-01-04 18:07:14 +0000 | [diff] [blame] | 24 | #include <asm/memory.h> |
Linus Walleij | bb3cee2 | 2009-04-23 10:22:13 +0100 | [diff] [blame] | 25 | |
Russell King | 98c672c | 2010-05-22 18:18:57 +0100 | [diff] [blame] | 26 | static void __init u300_reserve(void) |
| 27 | { |
| 28 | /* |
| 29 | * U300 - This platform family can share physical memory |
| 30 | * between two ARM cpus, one running Linux and the other |
| 31 | * running another OS. |
| 32 | */ |
| 33 | #ifdef CONFIG_MACH_U300_SINGLE_RAM |
| 34 | #if ((CONFIG_MACH_U300_ACCESS_MEM_SIZE & 1) == 1) && \ |
| 35 | CONFIG_MACH_U300_2MB_ALIGNMENT_FIX |
Russell King | 8d717a5 | 2010-05-22 19:47:18 +0100 | [diff] [blame] | 36 | memblock_reserve(PHYS_OFFSET, 0x00100000); |
Russell King | 98c672c | 2010-05-22 18:18:57 +0100 | [diff] [blame] | 37 | #endif |
| 38 | #endif |
| 39 | } |
| 40 | |
Linus Walleij | bb3cee2 | 2009-04-23 10:22:13 +0100 | [diff] [blame] | 41 | static void __init u300_init_machine(void) |
| 42 | { |
| 43 | u300_init_devices(); |
| 44 | } |
| 45 | |
| 46 | #ifdef CONFIG_MACH_U300_BS2X |
| 47 | #define MACH_U300_STRING "Ericsson AB U300 S25/S26/B25/B26 Prototype Board" |
| 48 | #endif |
| 49 | |
| 50 | #ifdef CONFIG_MACH_U300_BS330 |
| 51 | #define MACH_U300_STRING "Ericsson AB U330 S330/B330 Prototype Board" |
| 52 | #endif |
| 53 | |
| 54 | #ifdef CONFIG_MACH_U300_BS335 |
| 55 | #define MACH_U300_STRING "Ericsson AB U335 S335/B335 Prototype Board" |
| 56 | #endif |
| 57 | |
| 58 | #ifdef CONFIG_MACH_U300_BS365 |
| 59 | #define MACH_U300_STRING "Ericsson AB U365 S365/B365 Prototype Board" |
| 60 | #endif |
| 61 | |
| 62 | MACHINE_START(U300, MACH_U300_STRING) |
| 63 | /* Maintainer: Linus Walleij <linus.walleij@stericsson.com> */ |
Nicolas Pitre | 4611b68 | 2011-07-05 22:38:18 -0400 | [diff] [blame] | 64 | .atag_offset = BOOT_PARAMS_OFFSET, |
Linus Walleij | bb3cee2 | 2009-04-23 10:22:13 +0100 | [diff] [blame] | 65 | .map_io = u300_map_io, |
Russell King | 98c672c | 2010-05-22 18:18:57 +0100 | [diff] [blame] | 66 | .reserve = u300_reserve, |
Linus Walleij | bb3cee2 | 2009-04-23 10:22:13 +0100 | [diff] [blame] | 67 | .init_irq = u300_init_irq, |
| 68 | .timer = &u300_timer, |
| 69 | .init_machine = u300_init_machine, |
| 70 | MACHINE_END |