mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH v2 06/11] ARM: DIGIC: add Canon PowerShot A1100 IS support
Date: Tue, 29 Jul 2014 01:15:25 +0400	[thread overview]
Message-ID: <1406582130-10116-7-git-send-email-antonynpavlov@gmail.com> (raw)
In-Reply-To: <1406582130-10116-1-git-send-email-antonynpavlov@gmail.com>

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 arch/arm/boards/Makefile               |  1 +
 arch/arm/boards/canon-a1100/Makefile   |  1 +
 arch/arm/boards/canon-a1100/lowlevel.c | 23 ++++++++++++++++++++++
 arch/arm/dts/canon-a1100.dts           | 35 ++++++++++++++++++++++++++++++++++
 arch/arm/mach-digic/Kconfig            |  7 +++++++
 5 files changed, 67 insertions(+)

diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile
index 2ed3730..c60da81 100644
--- a/arch/arm/boards/Makefile
+++ b/arch/arm/boards/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_MACH_AT91SAM9N12EK)		+= at91sam9n12ek/
 obj-$(CONFIG_MACH_AT91SAM9X5EK)			+= at91sam9x5ek/
 obj-$(CONFIG_MACH_BEAGLE)			+= beagle/
 obj-$(CONFIG_MACH_BEAGLEBONE)			+= beaglebone/
+obj-$(CONFIG_MACH_CANON_A1100)			+= canon-a1100/
 obj-$(CONFIG_MACH_NITROGEN6X)			+= boundarydevices-nitrogen6x/
 obj-$(CONFIG_MACH_CCMX51)			+= ccxmx51/
 obj-$(CONFIG_MACH_CFA10036)			+= crystalfontz-cfa10036/
diff --git a/arch/arm/boards/canon-a1100/Makefile b/arch/arm/boards/canon-a1100/Makefile
new file mode 100644
index 0000000..b08c4a9
--- /dev/null
+++ b/arch/arm/boards/canon-a1100/Makefile
@@ -0,0 +1 @@
+lwl-y += lowlevel.o
diff --git a/arch/arm/boards/canon-a1100/lowlevel.c b/arch/arm/boards/canon-a1100/lowlevel.c
new file mode 100644
index 0000000..bbae825
--- /dev/null
+++ b/arch/arm/boards/canon-a1100/lowlevel.c
@@ -0,0 +1,23 @@
+#include <common.h>
+#include <sizes.h>
+#include <asm/barebox-arm-head.h>
+#include <asm/barebox-arm.h>
+
+void __naked barebox_arm_reset_vector(void)
+{
+	arm_cpu_lowlevel_init();
+
+	/* FIXME: can we determine RAM size using CP15 register?
+	 *
+	 * see http://chdk.setepontos.com/index.php?topic=5980.90
+	 *
+	 * http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0363e/Bgbcdeca.html
+	 * 4.2.19. c6, MPU memory region programming registers
+	 *
+	 * But the 'cpuinfo' command says that the Protection
+	 * unit is disabled.
+	 * The Control Register value (mrc    p15, 0, %0, c0, c1, 4)
+	 * is 0x00051078.
+	 */
+	barebox_arm_entry(0x0, SZ_64M, 0);
+}
diff --git a/arch/arm/dts/canon-a1100.dts b/arch/arm/dts/canon-a1100.dts
new file mode 100644
index 0000000..a88eacf
--- /dev/null
+++ b/arch/arm/dts/canon-a1100.dts
@@ -0,0 +1,35 @@
+/dts-v1/;
+
+/include/ "digic4.dtsi"
+
+/ {
+	model = "Canon PowerShot A1100 IS";
+	compatible = "canon,a1100";
+
+	memory {
+		reg = <0x00000000 0x04000000>;
+	};
+
+	flash@f8000000 {
+		compatible = "cfi-flash";
+		reg = <0xf8000000 0x08000000>;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		direct_print {
+			label = "direct-print (blue)";
+			gpios = <&gpio 51 0>;
+		};
+
+		auto_focus {
+			label = "auto-focus (red)";
+			gpios = <&gpio 55 0>;
+		};
+	};
+};
+
+&timer2 {
+        status = "okay";
+};
diff --git a/arch/arm/mach-digic/Kconfig b/arch/arm/mach-digic/Kconfig
index 49ce44a..d25c3b3 100644
--- a/arch/arm/mach-digic/Kconfig
+++ b/arch/arm/mach-digic/Kconfig
@@ -3,6 +3,13 @@ if ARCH_DIGIC
 choice
 	prompt "camera type"
 
+config MACH_CANON_A1100
+	bool "Canon PowerShot A1100 IS"
+
 endchoice
 
+config ARCH_TEXT_BASE
+	hex
+	default 0x00001900 if MACH_CANON_A1100
+
 endif
-- 
2.0.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2014-07-28 21:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-28 21:15 [PATCH v2 00/11] ARM: add support for Canon DIGIC chips and Canon PowerShot A1100 IS Antony Pavlov
2014-07-28 21:15 ` [PATCH v2 01/11] ARM: add ARM946E-S CPU type Antony Pavlov
2014-07-28 21:15 ` [PATCH v2 02/11] ARM: add very initial support for Canon DIGIC chips Antony Pavlov
2014-07-28 21:15 ` [PATCH v2 03/11] clocksource: add driver for Canon DIGIC timer Antony Pavlov
2014-07-28 21:15 ` [PATCH v2 04/11] serial: add driver for Canon DIGIC UART Antony Pavlov
2014-07-28 21:15 ` [PATCH v2 05/11] gpio: add driver for Canon DIGIC Antony Pavlov
2014-07-28 21:15 ` Antony Pavlov [this message]
2014-07-28 21:15 ` [PATCH v2 07/11] ARM: add Canon A1100 ROM image generation Antony Pavlov
2014-07-28 21:15 ` [PATCH v2 08/11] ARM: DIGIC: add canon-a1100_defconfig Antony Pavlov
2014-07-28 21:15 ` [PATCH v2 09/11] Documentation: add QEMU Canon A1100 barebox mini-howto Antony Pavlov
2014-07-28 21:15 ` [PATCH v2 10/11] ARM: add Canon A1100 DISKBOOT.BIN image generation stuff Antony Pavlov
2014-07-28 21:15 ` [PATCH v2 11/11] Documentation: add real Canon A1100 camera barebox mini-howto Antony Pavlov
2014-07-29 13:20 ` [PATCH v2 00/11] ARM: add support for Canon DIGIC chips and Canon PowerShot A1100 IS Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1406582130-10116-7-git-send-email-antonynpavlov@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox