From 0d5a68aad49f88bb05a8afaf8d4e43cd8694f1ee Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Tue, 21 Oct 2008 14:06:58 +0100 Subject: [ARM] S3C64XX: Common init code for S3C6400 and S3C6410 Add the common initialisation code for both the S3C6400 and S3C6410, the UART registration. Signed-off-by: Ben Dooks --- arch/arm/plat-s3c64xx/Kconfig | 6 ++++++ arch/arm/plat-s3c64xx/Makefile | 4 ++++ arch/arm/plat-s3c64xx/s3c6400-init.c | 29 +++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 arch/arm/plat-s3c64xx/s3c6400-init.c (limited to 'arch/arm/plat-s3c64xx') diff --git a/arch/arm/plat-s3c64xx/Kconfig b/arch/arm/plat-s3c64xx/Kconfig index 14d6343b54e..8ed2f7b8611 100644 --- a/arch/arm/plat-s3c64xx/Kconfig +++ b/arch/arm/plat-s3c64xx/Kconfig @@ -21,4 +21,10 @@ if PLAT_S3C64XX # Configuration options shared by all S3C64XX implementations +config CPU_S3C6400_INIT + bool + help + Common initialisation code for the S3C6400 that is shared + by other CPUs in the series, such as the S3C6410. + endif diff --git a/arch/arm/plat-s3c64xx/Makefile b/arch/arm/plat-s3c64xx/Makefile index 9be8ed59977..26b5714ee73 100644 --- a/arch/arm/plat-s3c64xx/Makefile +++ b/arch/arm/plat-s3c64xx/Makefile @@ -15,3 +15,7 @@ obj- := obj-y += dev-uart.o obj-y += cpu.o obj-y += irq.o + +# CPU support + +obj-$(CONFIG_CPU_S3C6400_INIT) += s3c6400-init.o diff --git a/arch/arm/plat-s3c64xx/s3c6400-init.c b/arch/arm/plat-s3c64xx/s3c6400-init.c new file mode 100644 index 00000000000..6c28f39df09 --- /dev/null +++ b/arch/arm/plat-s3c64xx/s3c6400-init.c @@ -0,0 +1,29 @@ +/* linux/arch/arm/plat-s3c64xx/s3c6400-init.c + * + * Copyright 2008 Openmoko, Inc. + * Copyright 2008 Simtec Electronics + * Ben Dooks + * http://armlinux.simtec.co.uk/ + * + * S3C6400 - CPU initialisation (common with other S3C64XX chips) + * + * 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. + */ + +#include +#include +#include + +#include +#include +#include +#include + +/* uart registration process */ + +void __init s3c6400_common_init_uarts(struct s3c2410_uartcfg *cfg, int no) +{ + s3c24xx_init_uartdevs("s3c6400-uart", s3c64xx_uart_resources, cfg, no); +} -- cgit v1.2.3