Re: [PATCH] ARM: OMAP3: Add support for the IGEP v2 board (rev B)

2009-10-14 Thread Enric Balletbò i Serra
Ok, I will resubmit in few minuts

Thanks,

  Enric

2009/10/13 Tony Lindgren t...@atomide.com:
 * Enric Balletbò i Serra eballe...@gmail.com [091009 09:18]:
   This patch adds minimal IGEP v2 support.

 Can you please move the defconfig into a separate patch
 when you resubmit? It makes it easier for people to read
 the patch.

 Regards,

 Tony

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: OMAP3: Add support for the IGEP v2 board (rev B)

2009-10-13 Thread Enric Balletbò i Serra
Hello Nishanth,

Thanks for your feedback, I'll forward the patch correcting some things

2009/10/10 Nishanth Menon n...@ti.com:

 could you add more details on where do we get more data on this platform?

More details will be in new patch and you can get more information here:

   www.igep-platform.com

Regards,

   Enric

2009/10/10 Nishanth Menon n...@ti.com:
 Hi,
 Thanks for the patch.. a few minor comments follow from a read through..

 Enric Balletbò i Serra had written, on 10/09/2009 10:59 AM, the following:

  This patch adds minimal IGEP v2 support.

 could you add more details on where do we get more data on this platform?


 Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
 ---
  arch/arm/configs/igep0020_defconfig  | 1443
 ++
  arch/arm/mach-omap2/Kconfig          |    4 +
  arch/arm/mach-omap2/Makefile         |    2 +
  arch/arm/mach-omap2/board-igep0020.c |  239 ++
  4 files changed, 1688 insertions(+), 0 deletions(-)
  create mode 100644 arch/arm/configs/igep0020_defconfig
  create mode 100644 arch/arm/mach-omap2/board-igep0020.c

 [...]

 --- /dev/null
 +++ b/arch/arm/mach-omap2/board-igep0020.c
 @@ -0,0 +1,239 @@
 +/*

 [..]

 +static inline void __init igep2_init_smsc911x(void)
 +{
 +       unsigned long cs_mem_base;
 +
 +       if (gpmc_cs_request(IGEP2_SMSC911X_CS, SZ_16M, cs_mem_base)  0)
 {
 +               printk(KERN_ERR Failed request for GPMC mem for
 smsc911x\n);
 +               return;
 +       }
 +
 +       igep2_smsc911x_resources[0].start = cs_mem_base + 0x0;
 +       igep2_smsc911x_resources[0].end   = cs_mem_base + 0xff;
 +
 +       if ((gpio_request(IGEP2_SMSC911X_GPIO, SMSC911X IRQ) == 0) 
 +           (gpio_direction_input(IGEP2_SMSC911X_GPIO) == 0)) {
 +               gpio_export(IGEP2_SMSC911X_GPIO, 0);
 +       } else {

 could you run scripts/checkpatch --strict ../patchName after generating the
 patch with git format-patch -s -M -o .. -1 ? one liners dont usually need a
 {} also there are few warning inducing code below..

 +               printk(KERN_ERR could not obtain gpio for SMSC911X
 IRQ\n);

 probably dumb question: should'nt we be moving to pr_err and family instead
 of printks?

 further, if this does not work.. are'nt you supposed to release the cs?
 gpmc_cs_free perhaps?

 +               return;
 +       }
 +
 +       igep2_smsc911x_resources[1].start =
 OMAP_GPIO_IRQ(IGEP2_SMSC911X_GPIO);
 +       igep2_smsc911x_resources[1].end   = 0;
 +
 +       platform_device_register(igep2_smsc911x_device);
 +}
 +
 +#else
 +
 +static inline void __init igep2_init_smsc911x(void) { }
 +
 +#endif
 +

 [..]

 +               .flags          = I2C_CLIENT_WAKE,
 +               .irq            = INT_34XX_SYS_NIRQ,
 +               .platform_data  = igep2_twldata,
 +       },
 +};
 +
 +static int __init igep2_i2c_init(void)
 +{
 +       omap_register_i2c_bus(1, 2600, igep2_i2c_boardinfo,
 +                       ARRAY_SIZE(igep2_i2c_boardinfo));

 you may want to step down to 2400
 http://marc.info/?l=linux-omapm=125510664919890w=2 if you are using
 26Mhz.. if you are using twl5030..

 +       omap_register_i2c_bus(3, 400, NULL, 0);
 +       return 0;
 +}
 +
 +static void __init igep2_init(void)
 +{
 +       igep2_i2c_init();
 +       omap_serial_init();
 +       usb_musb_init();
 +
 +       igep2_init_smsc911x();
 +
 +       /* GPIO userspace leds */
 +       if ((gpio_request(IGEP2_GPIO_LED_0_RED, GPIO_LED_0_RED) == 0) 
 (gpio_direction_output(IGEP2_GPIO_LED_0_RED, 1) == 0)) {
 +               gpio_export(IGEP2_GPIO_LED_0_RED, 1);
 +       } else {
 +               printk(KERN_ERR could not obtain gpio for 
 GPIO_LED_0_RED\n);

 do you really want to flag a an error for a led glow?

 +       }
 +       if ((gpio_request(IGEP2_GPIO_LED_0_GREEN, GPIO_LED_0_GREEN) ==
 0)
  (gpio_direction_output(IGEP2_GPIO_LED_0_GREEN, 1) == 0)) {
 +               gpio_export(IGEP2_GPIO_LED_0_GREEN, 1);
 +       } else {
 +               printk(KERN_ERR could not obtain gpio for 
 GPIO_LED_0_GREEN\n);
 +       }
 +       if ((gpio_request(IGEP2_GPIO_LED_1_RED, GPIO_LED_1_RED) == 0) 
 (gpio_direction_output(IGEP2_GPIO_LED_1_RED, 1) == 0)) {

 here is a an long line?
 [...]
 --
 Regards,
 Nishanth Menon

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: OMAP3: Add support for the IGEP v2 board (rev B)

2009-10-13 Thread Tony Lindgren
* Enric Balletbò i Serra eballe...@gmail.com [091009 09:18]:
   This patch adds minimal IGEP v2 support.

Can you please move the defconfig into a separate patch
when you resubmit? It makes it easier for people to read
the patch.

Regards,

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: OMAP3: Add support for the IGEP v2 board (rev B)

2009-10-09 Thread Enric Balletbò i Serra
  This patch adds minimal IGEP v2 support.

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 arch/arm/configs/igep0020_defconfig  | 1443 ++
 arch/arm/mach-omap2/Kconfig  |4 +
 arch/arm/mach-omap2/Makefile |2 +
 arch/arm/mach-omap2/board-igep0020.c |  239 ++
 4 files changed, 1688 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/configs/igep0020_defconfig
 create mode 100644 arch/arm/mach-omap2/board-igep0020.c

diff --git a/arch/arm/configs/igep0020_defconfig
b/arch/arm/configs/igep0020_defconfig
new file mode 100644
index 000..639920d
--- /dev/null
+++ b/arch/arm/configs/igep0020_defconfig
@@ -0,0 +1,1443 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.32-rc3
+# Fri Oct  9 16:01:26 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_ARCH_HAS_CPUFREQ=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0x
+CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config
+CONFIG_CONSTRUCTORS=y
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_TREE_RCU=y
+# CONFIG_TREE_PREEMPT_RCU is not set
+# CONFIG_RCU_TRACE is not set
+CONFIG_RCU_FANOUT=32
+# CONFIG_RCU_FANOUT_EXACT is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=17
+CONFIG_GROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
+# CONFIG_SYSFS_DEPRECATED_V2 is not set
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+# CONFIG_RD_LZMA is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+# CONFIG_SYSCTL_SYSCALL is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+
+#
+# Kernel Performance Events And Counters
+#
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_COMPAT_BRK=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+
+#
+# GCOV-based kernel profiling
+#
+# CONFIG_SLOW_WORK is not set
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_BLOCK=y
+CONFIG_LBDAF=y
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED=anticipatory
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+CONFIG_MMU=y
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_GEMINI is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_STMP3XXX is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_NOMADIK is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_W90X900 

Re: [PATCH] ARM: OMAP3: Add support for the IGEP v2 board (rev B)

2009-10-09 Thread Nishanth Menon

Hi,
Thanks for the patch.. a few minor comments follow from a read through..

Enric Balletbò i Serra had written, on 10/09/2009 10:59 AM, the following:

  This patch adds minimal IGEP v2 support.


could you add more details on where do we get more data on this platform?



Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 arch/arm/configs/igep0020_defconfig  | 1443 ++
 arch/arm/mach-omap2/Kconfig  |4 +
 arch/arm/mach-omap2/Makefile |2 +
 arch/arm/mach-omap2/board-igep0020.c |  239 ++
 4 files changed, 1688 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/configs/igep0020_defconfig
 create mode 100644 arch/arm/mach-omap2/board-igep0020.c

[...]


--- /dev/null
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -0,0 +1,239 @@
+/*

[..]


+static inline void __init igep2_init_smsc911x(void)
+{
+   unsigned long cs_mem_base;
+
+   if (gpmc_cs_request(IGEP2_SMSC911X_CS, SZ_16M, cs_mem_base)  0) {
+   printk(KERN_ERR Failed request for GPMC mem for smsc911x\n);
+   return;
+   }
+
+   igep2_smsc911x_resources[0].start = cs_mem_base + 0x0;
+   igep2_smsc911x_resources[0].end   = cs_mem_base + 0xff;
+
+   if ((gpio_request(IGEP2_SMSC911X_GPIO, SMSC911X IRQ) == 0) 
+   (gpio_direction_input(IGEP2_SMSC911X_GPIO) == 0)) {
+   gpio_export(IGEP2_SMSC911X_GPIO, 0);
+   } else {
could you run scripts/checkpatch --strict ../patchName after generating 
the patch with git format-patch -s -M -o .. -1 ? one liners dont usually 
need a {} also there are few warning inducing code below..

+   printk(KERN_ERR could not obtain gpio for SMSC911X IRQ\n);
probably dumb question: should'nt we be moving to pr_err and family 
instead of printks?


further, if this does not work.. are'nt you supposed to release the cs? 
gpmc_cs_free perhaps?



+   return;
+   }
+
+   igep2_smsc911x_resources[1].start = OMAP_GPIO_IRQ(IGEP2_SMSC911X_GPIO);
+   igep2_smsc911x_resources[1].end   = 0;
+
+   platform_device_register(igep2_smsc911x_device);
+}
+
+#else
+
+static inline void __init igep2_init_smsc911x(void) { }
+
+#endif
+

[..]

+   .flags  = I2C_CLIENT_WAKE,
+   .irq= INT_34XX_SYS_NIRQ,
+   .platform_data  = igep2_twldata,
+   },
+};
+
+static int __init igep2_i2c_init(void)
+{
+   omap_register_i2c_bus(1, 2600, igep2_i2c_boardinfo,
+   ARRAY_SIZE(igep2_i2c_boardinfo));
you may want to step down to 2400 
http://marc.info/?l=linux-omapm=125510664919890w=2 if you are using 
26Mhz.. if you are using twl5030..

+   omap_register_i2c_bus(3, 400, NULL, 0);
+   return 0;
+}
+
+static void __init igep2_init(void)
+{
+   igep2_i2c_init();
+   omap_serial_init();
+   usb_musb_init();
+
+   igep2_init_smsc911x();
+
+   /* GPIO userspace leds */
+   if ((gpio_request(IGEP2_GPIO_LED_0_RED, GPIO_LED_0_RED) == 0) 
(gpio_direction_output(IGEP2_GPIO_LED_0_RED, 1) == 0)) {
+   gpio_export(IGEP2_GPIO_LED_0_RED, 1);
+   } else {
+   printk(KERN_ERR could not obtain gpio for  
GPIO_LED_0_RED\n);

do you really want to flag a an error for a led glow?

+   }
+   if ((gpio_request(IGEP2_GPIO_LED_0_GREEN, GPIO_LED_0_GREEN) == 0)
 (gpio_direction_output(IGEP2_GPIO_LED_0_GREEN, 1) == 0)) {
+   gpio_export(IGEP2_GPIO_LED_0_GREEN, 1);
+   } else {
+   printk(KERN_ERR could not obtain gpio for  
GPIO_LED_0_GREEN\n);
+   }
+   if ((gpio_request(IGEP2_GPIO_LED_1_RED, GPIO_LED_1_RED) == 0) 
(gpio_direction_output(IGEP2_GPIO_LED_1_RED, 1) == 0)) {

here is a an long line?
[...]
--
Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html