From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Subject: [RFC 3/5] ARM: DIGIC: add Canon PowerShot A1100 IS support
Date: Mon, 5 Aug 2013 00:25:25 +0400 [thread overview]
Message-ID: <1375647927-30627-4-git-send-email-antonynpavlov@gmail.com> (raw)
In-Reply-To: <1375647927-30627-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/Kconfig | 10 ++++++++++
arch/arm/boards/canon-a1100/Makefile | 2 ++
arch/arm/boards/canon-a1100/board.c | 29 +++++++++++++++++++++++++++++
arch/arm/boards/canon-a1100/env/bin/init | 27 +++++++++++++++++++++++++++
arch/arm/boards/canon-a1100/lowlevel.c | 10 ++++++++++
arch/arm/mach-digic/Kconfig | 4 ++++
7 files changed, 83 insertions(+)
create mode 100644 arch/arm/boards/canon-a1100/Kconfig
create mode 100644 arch/arm/boards/canon-a1100/Makefile
create mode 100644 arch/arm/boards/canon-a1100/board.c
create mode 100644 arch/arm/boards/canon-a1100/env/bin/init
create mode 100644 arch/arm/boards/canon-a1100/lowlevel.c
diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile
index f1160f4..1eb120d 100644
--- a/arch/arm/boards/Makefile
+++ b/arch/arm/boards/Makefile
@@ -13,6 +13,7 @@ obj-$(CONFIG_MACH_AT91SAM9X5EK) += at91sam9x5ek/
obj-$(CONFIG_MACH_BEAGLE) += beagle/
obj-$(CONFIG_MACH_BEAGLEBONE) += beaglebone/
obj-$(CONFIG_MACH_CANON_600D) += canon-600d/
+obj-$(CONFIG_MACH_CANON_A1100) += canon-a1100/
obj-$(CONFIG_MACH_CCMX51) += ccxmx51/
obj-$(CONFIG_MACH_CFA10036) += crystalfontz-cfa10036/
obj-$(CONFIG_MACH_CHUMBY) += chumby_falconwing/
diff --git a/arch/arm/boards/canon-a1100/Kconfig b/arch/arm/boards/canon-a1100/Kconfig
new file mode 100644
index 0000000..4936336
--- /dev/null
+++ b/arch/arm/boards/canon-a1100/Kconfig
@@ -0,0 +1,10 @@
+if MACH_CANON_A1100
+
+config ARCH_TEXT_BASE
+ hex
+ default 0x00001900
+
+config BOARDINFO
+ default "Canon PowerShot A1100 IS"
+
+endif
diff --git a/arch/arm/boards/canon-a1100/Makefile b/arch/arm/boards/canon-a1100/Makefile
new file mode 100644
index 0000000..01c7a25
--- /dev/null
+++ b/arch/arm/boards/canon-a1100/Makefile
@@ -0,0 +1,2 @@
+obj-y += board.o
+lwl-y += lowlevel.o
diff --git a/arch/arm/boards/canon-a1100/board.c b/arch/arm/boards/canon-a1100/board.c
new file mode 100644
index 0000000..e508399
--- /dev/null
+++ b/arch/arm/boards/canon-a1100/board.c
@@ -0,0 +1,29 @@
+/*
+ * 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>
+#include <init.h>
+#include <sizes.h>
+#include <asm/memory.h>
+
+static int mem_init(void)
+{
+ arm_add_mem_device("ram0", 0, SZ_8M);
+
+ return 0;
+}
+mem_initcall(mem_init);
diff --git a/arch/arm/boards/canon-a1100/env/bin/init b/arch/arm/boards/canon-a1100/env/bin/init
new file mode 100644
index 0000000..d9173b2
--- /dev/null
+++ b/arch/arm/boards/canon-a1100/env/bin/init
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# Canon PowerShot A1100 IS "direct print" led (blue)
+LED_ADDR=0xC02200CC
+LED_ON=0x46
+LED_OFF=0x44
+
+mw $LED_ADDR $LED_ON
+echo "== /env/bin/init started =="
+echo
+echo "HELLO!"
+mw $LED_ADDR $LED_OFF
+echo
+iomem
+echo
+
+# blink forever
+# use 'echo' for delay
+while true; do
+ echo "led_on"
+ mw $LED_ADDR $LED_ON
+ echo "led_off"
+ mw $LED_ADDR $LED_OFF
+done
+
+#echo
+#echo "== /env/bin/init done =="
diff --git a/arch/arm/boards/canon-a1100/lowlevel.c b/arch/arm/boards/canon-a1100/lowlevel.c
new file mode 100644
index 0000000..aed34e0
--- /dev/null
+++ b/arch/arm/boards/canon-a1100/lowlevel.c
@@ -0,0 +1,10 @@
+#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();
+ barebox_arm_entry(0x0, SZ_8M, 0);
+}
diff --git a/arch/arm/mach-digic/Kconfig b/arch/arm/mach-digic/Kconfig
index d1561e8..7354540 100644
--- a/arch/arm/mach-digic/Kconfig
+++ b/arch/arm/mach-digic/Kconfig
@@ -6,8 +6,12 @@ choice
config MACH_CANON_600D
bool "Canon EOS 600D"
+config MACH_CANON_A1100
+ bool "Canon PowerShot A1100 IS"
+
endchoice
source arch/arm/boards/canon-600d/Kconfig
+source arch/arm/boards/canon-a1100/Kconfig
endif
--
1.8.3.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-08-04 20:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-04 20:25 [RFC 0/5] JUST-FOR-FUN: run barebox on Canon digital camera Antony Pavlov
2013-08-04 20:25 ` [RFC 1/5] ARM: add very initial support for Canon DIGIC chips Antony Pavlov
2013-08-04 20:25 ` [RFC 2/5] ARM: DIGIC: add Canon EOS 600D support Antony Pavlov
2013-08-04 20:25 ` Antony Pavlov [this message]
2013-08-04 20:25 ` [RFC 4/5] ARM: DIGIC: add canon-600d_defconfig Antony Pavlov
2013-08-04 20:25 ` [RFC 5/5] ARM: DIGIC: add canon-a1100_defconfig Antony Pavlov
2013-08-06 7:13 ` [RFC 0/5] JUST-FOR-FUN: run barebox on Canon digital camera Sascha Hauer
2013-08-06 9:42 ` Antony Pavlov
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=1375647927-30627-4-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