diff options
author | Antony Pavlov <antonynpavlov@gmail.com> | 2014-07-29 01:15:21 +0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-07-29 15:07:35 +0200 |
commit | f1fb740ed64a45c62e7888682150411abea0d2e3 (patch) | |
tree | afa7b804c67101b685fe5c4736eb6eaa76527e7d /arch/arm/mach-digic | |
parent | 420ca0be029d66124b82ce51f180f552f7c3593a (diff) | |
download | barebox-f1fb740ed64a45c62e7888682150411abea0d2e3.tar.gz barebox-f1fb740ed64a45c62e7888682150411abea0d2e3.tar.xz |
ARM: add very initial support for Canon DIGIC chips
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-digic')
-rw-r--r-- | arch/arm/mach-digic/Kconfig | 8 | ||||
-rw-r--r-- | arch/arm/mach-digic/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-digic/core.c | 25 | ||||
-rw-r--r-- | arch/arm/mach-digic/include/mach/debug_ll.h | 40 | ||||
-rw-r--r-- | arch/arm/mach-digic/include/mach/digic4.h | 23 | ||||
-rw-r--r-- | arch/arm/mach-digic/include/mach/uart.h | 28 |
6 files changed, 125 insertions, 0 deletions
diff --git a/arch/arm/mach-digic/Kconfig b/arch/arm/mach-digic/Kconfig new file mode 100644 index 0000000000..49ce44a07e --- /dev/null +++ b/arch/arm/mach-digic/Kconfig @@ -0,0 +1,8 @@ +if ARCH_DIGIC + +choice + prompt "camera type" + +endchoice + +endif diff --git a/arch/arm/mach-digic/Makefile b/arch/arm/mach-digic/Makefile new file mode 100644 index 0000000000..820eb10ac2 --- /dev/null +++ b/arch/arm/mach-digic/Makefile @@ -0,0 +1 @@ +obj-y += core.o diff --git a/arch/arm/mach-digic/core.c b/arch/arm/mach-digic/core.c new file mode 100644 index 0000000000..b1caec0bc8 --- /dev/null +++ b/arch/arm/mach-digic/core.c @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com> + * + * This file is part of barebox. + * See file CREDITS for list of people who contributed to this project. + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include <common.h> + +void __noreturn reset_cpu(unsigned long ignored) +{ + pr_err("%s: unimplemented\n", __func__); + hang(); +} +EXPORT_SYMBOL(reset_cpu); diff --git a/arch/arm/mach-digic/include/mach/debug_ll.h b/arch/arm/mach-digic/include/mach/debug_ll.h new file mode 100644 index 0000000000..721fd444c2 --- /dev/null +++ b/arch/arm/mach-digic/include/mach/debug_ll.h @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2013, 2014 Antony Pavlov <antonynpavlov@gmail.com> + * + * This file is part of barebox. + * See file CREDITS for list of people who contributed to this project. + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#ifndef __MACH_DEBUG_LL_H__ +#define __MACH_DEBUG_LL_H__ + +#include <io.h> +#include <mach/digic4.h> +#include <mach/uart.h> + +#define DEBUG_LL_UART DIGIC4_UART + +/* Serial interface registers */ +#define DEBUG_LL_UART_TX (DEBUG_LL_UART + DIGIC_UART_TX) +#define DEBUG_LL_UART_ST (DEBUG_LL_UART + DIGIC_UART_ST) + +static inline void PUTC_LL(char ch) +{ + while (!(readl(DEBUG_LL_UART_ST) & DIGIC_UART_ST_TX_RDY)) + ; /* noop */ + + writel(0x06, DEBUG_LL_UART_ST); + writel(ch, DEBUG_LL_UART_TX); +} + +#endif /* __MACH_DEBUG_LL_H__ */ diff --git a/arch/arm/mach-digic/include/mach/digic4.h b/arch/arm/mach-digic/include/mach/digic4.h new file mode 100644 index 0000000000..ffc7979a9c --- /dev/null +++ b/arch/arm/mach-digic/include/mach/digic4.h @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com> + * + * This file is part of barebox. + * See file CREDITS for list of people who contributed to this project. + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#ifndef __DIGIC4_H__ +#define __DIGIC4_H__ + +#define DIGIC4_UART 0xc0800000 + +#endif /* __DIGIC4_H__ */ diff --git a/arch/arm/mach-digic/include/mach/uart.h b/arch/arm/mach-digic/include/mach/uart.h new file mode 100644 index 0000000000..043f7cd0e9 --- /dev/null +++ b/arch/arm/mach-digic/include/mach/uart.h @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com> + * + * This file is part of barebox. + * See file CREDITS for list of people who contributed to this project. + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#ifndef __DIGIC_UART_H__ +#define __DIGIC_UART_H__ + +/* Serial interface registers offsets */ +#define DIGIC_UART_TX 0x0 +#define DIGIC_UART_RX 0x4 +#define DIGIC_UART_ST 0x14 +# define DIGIC_UART_ST_RX_RDY 1 +# define DIGIC_UART_ST_TX_RDY 2 + +#endif /* __DIGIC_UART_H__ */ |