Skip to contentSkip to conversation

SPEAr : Support added for SPEAr310 board

PATCH New Tom 3 participants 7 messages Jan 13, 2010 – Jan 16, 2010

lore
Share & tools
lore

Tom

author
#0 lore raw

PATCH v4 11/12 SPEAr : Support added for SPEAr310 board

SPEAr310 SoC support contains basic spear310 support along with the usage of following drivers
- serial driver(UART)
- i2c driver
- smi driver
- nand driver(FSMC)
- usbd driver
- emi driver(cfi support)

---
  MAKEALL                         |    1 +

<snip>

+#include <asm/arch/spr_defs.h>
+#include <asm/arch/spr_misc.h>
+#include <asm/arch/spr_nand.h>
+
+int board_init(void)
+{
+ return spear_board_init(MACH_TYPE_SPEAR300);
Does this need a new mach type ?
I see there isn't a SPEAR310 define in mach-types.
+}
+
+/*
+ * board_nand_init - Board specific NAND initialization
+ * @nand: mtd private chip structure
+ *
+ * Called by nand_init_chip to initialize the board specific functions
+ */
+
+int board_nand_init(struct nand_chip *nand)
+{
+ struct misc_regs *const misc_regs_p =
+ (struct misc_regs *)CONFIG_SPEAR_MISCBASE;
+
+ if (((readl(&misc_regs_p->auto_cfg_reg) & MISC_SOCCFGMSK) ==
+ MISC_SOCCFG30) ||
+ ((readl(&misc_regs_p->auto_cfg_reg) & MISC_SOCCFGMSK) ==
+ MISC_SOCCFG31)) {
+
+ return spear_nand_init(nand);
+ }
+
+ return -1;
+}

include/configs/spear.h +3 -0
index 15a8241..859b92f 100755
@@ -33,6 +33,9 @@
  #elif defined(CONFIG_MK_spear300)
  #define CONFIG_SPEAR3XX				1
  #define CONFIG_SPEAR300				1
+#elif defined(CONFIG_MK_spear310)
+#define CONFIG_SPEAR3XX				1
+#define CONFIG_SPEAR310				1
  #endif
 

Similar comment to the spear300 board
There needs to be a spear310 config file

Tom

#1 lore raw

PATCH v4 11/12 SPEAr : Support added for SPEAr310 board

Hello Tom,

Quoted 11 lines

<snip>

(quoted diff) +7 -0
+#include <asm/arch/spr_defs.h>
+#include <asm/arch/spr_misc.h>
+#include <asm/arch/spr_nand.h>
+
+int board_init(void)
+{
+    return spear_board_init(MACH_TYPE_SPEAR300);

Does this need a new mach type ?
I see there isn't a SPEAR310 define in mach-types.

Actually, spear310 and spear320 are variants of a base version spear300 This is why we are using a single mach type

Regards
Vipin

author
#2 lore raw

PATCH v4 11/12 SPEAr : Support added for SPEAr310 board

Quoted 4 lines · Vipin KUMAR

Hello Tom,

Quoted 2 lines

<snip>

Quoted 13 lines
Quoted 9 lines
(quoted diff) +7 -0
+#include <asm/arch/spr_defs.h>
+#include <asm/arch/spr_misc.h>
+#include <asm/arch/spr_nand.h>
+
+int board_init(void)
+{
+    return spear_board_init(MACH_TYPE_SPEAR300);

Does this need a new mach type ?
I see there isn't a SPEAR310 define in mach-types.

Actually, spear310 and spear320 are variants of a base version spear300 This is why we are using a single mach type

Ok.
Then the 310 and 320 board *.c files can be combined into 300 board files These look like they are copies of the 300 file.
Tom

Quoted 2 lines

Regards
Vipin

#3 lore raw

PATCH v4 11/12 SPEAr : Support added for SPEAr310 board

Hello Tom,

Quoted 16 lines
Quoted 15 lines
Quoted 11 lines

<snip>

(quoted diff) +7 -0
+#include <asm/arch/spr_defs.h>
+#include <asm/arch/spr_misc.h>
+#include <asm/arch/spr_nand.h>
+
+int board_init(void)
+{
+ ? ?return spear_board_init(MACH_TYPE_SPEAR300);

Does this need a new mach type ?
I see there isn't a SPEAR310 define in mach-types.

Actually, spear310 and spear320 are variants of a base version spear300 This is why we are using a single mach type

Quoted 5 lines

Ok.
Then the 310 and 320 board *.c files can be combined into 300 board files These look like they are copies of the 300 file.
Tom

Please find the patchset v5 for SPEAr support on the mailing list It contains all your suggested changes
Please consider it for mainline inclusion

Regards
Vipin

author
#4 lore raw

PATCH v4 11/12 SPEAr : Support added for SPEAr310 board

Quoted 22 lines · Vipin Kumar

Hello Tom,

Quoted 14 lines
Quoted 14 lines
Quoted 11 lines

<snip>

(quoted diff) +7 -0
+#include <asm/arch/spr_defs.h>
+#include <asm/arch/spr_misc.h>
+#include <asm/arch/spr_nand.h>
+
+int board_init(void)
+{
+    return spear_board_init(MACH_TYPE_SPEAR300);

Does this need a new mach type ?
I see there isn't a SPEAR310 define in mach-types.

Actually, spear310 and spear320 are variants of a base version spear300 This is why we are using a single mach type

Quoted 5 lines

Ok.
Then the 310 and 320 board *.c files can be combined into 300 board files These look like they are copies of the 300 file.
Tom

Quoted 4 lines

Please find the patchset v5 for SPEAr support on the mailing list It contains all your suggested changes
Please consider it for mainline inclusion

I see in v5 that the 300,310,320 boards are still in separate files. These all look like copies and could be combined.

Do you expect there will be a need in the future to add unique code to each of these board files?
If not, please look into combining them.

I will provide feedback on the other files shortly.

Tom

Quoted 2 lines

Regards
Vipin

#5 lore raw

PATCH v4 11/12 SPEAr : Support added for SPEAr310 board

Quoted 32 lines · Tom
Quoted 24 lines · Vipin Kumar

Hello Tom,

Quoted 15 lines
Quoted 15 lines
Quoted 11 lines

<snip>

(quoted diff) +7 -0
+#include <asm/arch/spr_defs.h>
+#include <asm/arch/spr_misc.h>
+#include <asm/arch/spr_nand.h>
+
+int board_init(void)
+{
+ ? ?return spear_board_init(MACH_TYPE_SPEAR300);

Does this need a new mach type ?
I see there isn't a SPEAR310 define in mach-types.

Actually, spear310 and spear320 are variants of a base version spear300 This is why we are using a single mach type

Quoted 5 lines

Ok.
Then the 310 and 320 board *.c files can be combined into 300 board files These look like they are copies of the 300 file.
Tom

Quoted 4 lines

Please find the patchset v5 for SPEAr support on the mailing list It contains all your suggested changes
Please consider it for mainline inclusion

I see in v5 that the 300,310,320 boards are still in separate files. These all look like copies and could be combined.

Quoted 8 lines

Do you expect there will be a need in the future to add unique code to each of these board files?
If not, please look into combining them.

I will provide feedback on the other files shortly.

Tom

Although all three are based on one chip but sp300, sp310 and sp320 are different SoCs and support different IPs.
Yes, board files are copies of each other as of now but may diverge in future
I would rather create different mach ids rather than combining them into one.

Regards
Vipin

author
#6 lore raw

PATCH v4 11/12 SPEAr : Support added for SPEAr310 board

Quoted 39 lines · Vipin Kumar
Quoted 29 lines · Tom
Quoted 16 lines · Vipin Kumar

Hello Tom,

Quoted 14 lines
Quoted 14 lines
Quoted 11 lines

<snip>

(quoted diff) +7 -0
+#include <asm/arch/spr_defs.h>
+#include <asm/arch/spr_misc.h>
+#include <asm/arch/spr_nand.h>
+
+int board_init(void)
+{
+    return spear_board_init(MACH_TYPE_SPEAR300);

Does this need a new mach type ?
I see there isn't a SPEAR310 define in mach-types.

Actually, spear310 and spear320 are variants of a base version spear300 This is why we are using a single mach type

Quoted 9 lines
Quoted 5 lines

Ok.
Then the 310 and 320 board *.c files can be combined into 300 board files These look like they are copies of the 300 file.
Tom

Please find the patchset v5 for SPEAr support on the mailing list It contains all your suggested changes
Please consider it for mainline inclusion

I see in v5 that the 300,310,320 boards are still in separate files. These all look like copies and could be combined.

Quoted 8 lines

Do you expect there will be a need in the future to add unique code to each of these board files?
If not, please look into combining them.

I will provide feedback on the other files shortly.

Tom

Quoted 6 lines

Although all three are based on one chip but sp300, sp310 and sp320 are different SoCs and support different IPs.
Yes, board files are copies of each other as of now but may diverge in future
I would rather create different mach ids rather than combining them into one.

Ok.
Fine to leave them as-is.
Tom

Quoted 3 lines

Regards
Vipin