Marvell MV88F6281GTW_GE Board support
PATCH v5 1/1 Marvell MV88F6281GTW_GE Board support
From: prafulla_wadaskar <[email protected]>
This is Marvell's 88F6281_A0 based custom board developed for wireless access point product
This patch is tested for-
1. Boot from DRAM/SPI flash/NFS
2. File transfer using tftp and loadb
3. SPI flash read/write/erase
4. Booting Linux kernel and RFS from SPI flash
---
Change log
v2: updated as per first review commentsdebug_prints updated to debug
v3: updaed as per review comments for v2
added mv88f6281gtw_ge.h file
removed BITxx macros
v4: updated as per review comments for v3 arch_misc_init support is added and used from kirkwood
v5: updated as per review comments for v4 CONFIG_MACH_MV88F6281GTW_GE added
more comments added and
serial configuration removed from mv88f6281gtw_ge.c
MAKEALL | 1 + Makefile | 3 + board/Marvell/mv88f6281gtw_ge/Makefile | 51 +++++++ board/Marvell/mv88f6281gtw_ge/config.mk | 25 +++ board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c | 89 +++++++++++ board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.h | 51 +++++++ board/Marvell/mv88f6281gtw_ge/u-boot.lds | 53 +++++++ include/configs/mv88f6281gtw_ge.h | 180 +++++++++++++++++++++++ 8 files changed, 453 insertions(+), 0 deletions(-) create mode 100644 board/Marvell/mv88f6281gtw_ge/Makefile create mode 100644 board/Marvell/mv88f6281gtw_ge/config.mk create mode 100644 board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c create mode 100644 board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.h create mode 100644 board/Marvell/mv88f6281gtw_ge/u-boot.lds create mode 100644 include/configs/mv88f6281gtw_ge.h
MAKEALL +1 -0
@@ -504,6 +504,7 @@ LIST_ARM9=" \ cp946es \ cp966 \ lpd7a400 \ + mv88f6281gtw_ge \ mx1ads \ mx1fs2 \ netstar \
Makefile +3 -0
@@ -2795,6 +2795,9 @@ lpd7a400_config \ lpd7a404_config: unconfig @$(MKCONFIG) $(@:_config=) arm lh7a40x lpd7a40x +mv88f6281gtw_ge_config: unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs $(@:_config=) Marvell kirkwood + mx1ads_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm920t mx1ads NULL imx
board/Marvell/mv88f6281gtw_ge/Makefile new file +51 -0
51 lines not on this page · raw message
board/Marvell/mv88f6281gtw_ge/config.mk new file +25 -0
@@ -0,0 +1,25 @@ +# +# (C) Copyright 2009 +# Marvell Semiconductor <www.marvell.com> +# Prafulla Wadaskar <[email protected]> +# +# 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 as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA +# + +TEXT_BASE = 0x00600000
board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c new file +89 -0
89 lines not on this page · raw message
board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.h new file +51 -0
51 lines not on this page · raw message
board/Marvell/mv88f6281gtw_ge/u-boot.lds new file +53 -0
53 lines not on this page · raw message
include/configs/mv88f6281gtw_ge.h new file +180 -0
180 lines not on this page · raw message
Signature · 1 line
1.5.3.4
PATCH v5 1/1 Marvell MV88F6281GTW_GE Board support
Hi Prafulla,
Quoted 188 lines · Prafulla Wadaskar
From:
prafulla_wadaskar<[email protected]>This is Marvell's 88F6281_A0 based custom board developed for wireless access point product
This patch is tested for-
1. Boot from DRAM/SPI flash/NFS
2. File transfer using tftp and loadb
3. SPI flash read/write/erase
4. Booting Linux kernel and RFS from SPI flashReviewed-by Ronen Shitrit <[email protected]>Signed-off-by Prafulla Wadaskar <[email protected]>---
Change log
v2: updated as per first review commentsdebug_printsupdated to debugv3: updaed as per review comments for v2
addedmv88f6281gtw_ge.hfile
removed BITxx macrosv4: updated as per review comments for v3
arch_misc_initsupport is added and used from kirkwoodv5: updated as per review comments for v4
CONFIG_MACH_MV88F6281GTW_GEadded
more comments added and
serial configuration removed frommv88f6281gtw_ge.cMAKEALL | 1 + Makefile | 3 + board/Marvell/mv88f6281gtw_ge/Makefile | 51 +++++++ board/Marvell/mv88f6281gtw_ge/config.mk | 25 +++ board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c | 89 +++++++++++ board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.h | 51 +++++++ board/Marvell/mv88f6281gtw_ge/u-boot.lds | 53 +++++++ include/configs/mv88f6281gtw_ge.h | 180 +++++++++++++++++++++++ 8 files changed, 453 insertions(+), 0 deletions(-) create mode 100644 board/Marvell/mv88f6281gtw_ge/Makefile create mode 100644 board/Marvell/mv88f6281gtw_ge/config.mk create mode 100644 board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c create mode 100644 board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.h create mode 100644 board/Marvell/mv88f6281gtw_ge/u-boot.lds create mode 100644 include/configs/mv88f6281gtw_ge.hMAKEALL +1
-0@@ -504,6 +504,7 @@ LIST_ARM9=" \ cp946es \ cp966 \ lpd7a400 \ + mv88f6281gtw_ge \ mx1ads \ mx1fs2 \ netstar \Makefile +2
-0@@ -2795,6 +2795,9 @@ lpd7a400_config \ lpd7a404_config: unconfig @$(MKCONFIG) $(@:_config=) arm lh7a40x lpd7a40x +mv88f6281gtw_ge_config: unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs $(@:_config=) Marvellkirkwood
Makefile +1
-0+ mx1ads_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm920t mx1ads NULL imxboard/Marvell/mv88f6281gtw_ge/Makefile new file +51
-0@@ -0,0 +1,51 @@ +# +# (C) Copyright 2009 +# Marvell Semiconductor <www.marvell.com> +# Prafulla Wadaskar <[email protected]> +# +# 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 as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).a + +COBJS := mv88f6281gtw_ge.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak .depend + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################(quoted diff) +0
-0config.mk
new file mode 100644
index 0000000..fb29a1bboard/Marvell/mv88f6281gtw_ge/config.mk new file +25
-0@@ -0,0 +1,25 @@ +# +# (C) Copyright 2009 +# Marvell Semiconductor <www.marvell.com> +# Prafulla Wadaskar <[email protected]> +# +# 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 as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA +# + +TEXT_BASE = 0x00600000board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c new file +16
-0@@ -0,0 +1,89 @@ +/* +* (C) Copyright 2009 +* Marvell Semiconductor <www.marvell.com> +* Prafulla Wadaskar <[email protected]> +* +* 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 as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* 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
board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c line 26
Quoted 10 lines
board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c new file +10
-0+* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +* MA 02110-1301 USA +*/ + +#include <common.h> +#include <../drivers/net/phy/mv88e61xx.h>
If this header is meant to be public it should be in "include". Sorry I didn't catch that earlier.
<snip>
Quoted 10 lines
board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c new file +6
-0+/* +* Ethernet Driver configuration +*/ +#ifdef CONFIG_CMD_NET +#define CONFIG_NETCONSOLE /* include NetConsole support */ +#define CONFIG_NET_MULTI /* specify more that one ports available */ +#define CONFIG_MII /* expose smi ove miiphy interface */
+#defineCONFIG_KIRKWOOD_EGIGA/* Enable kirkwood Gbe Controller Driver */
This EGIGA driver hasn't been accepted yet. In fact, I think you've only sent one spin. It needs to be in before this board...
Quoted 15 lines
board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c new file +10
-0+#define CONFIG_SYS_FAULT_ECHO_LINK_DOWN /* detect link using phy */ +#define CONFIG_KIRKWOOD_EGIGA_PORTS {1,0}/* enable port 0 only */ +#define CONFIG_ENV_OVERWRITE /* ethaddr can be reprogrammed */ +#endif /* CONFIG_CMD_NET */ + +/* +* Marvell 88Exxxx Switch configurations +*/ +#define CONFIG_RESET_PHY_R /* use reset_phy() to init phy/swtich */ +#define CONFIG_MV88E61XX_SWITCH /* Enable mv88e61xx switch driver */
board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c new file +2
-1+ +#endif /* _CONFIG_MV88F6281GTW_GE_H */ --
Quoted 2 lines
1.5.3.4
regards,
Ben
PATCH v5 1/1 Marvell MV88F6281GTW_GE Board support
Quoted 7 lines
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
Quoted 6 lines
+#include <
common.h>
+#include <../drivers/net/phy/mv88e61xx.h>If this header is meant to be public it should be in "include". Sorry I didn't catch that earlier. <snip>
This header has some public and some driver specific information Only a configuration structure in this file is needed here, I can put it in netdev.h but I didn't find such implementation there. How about creating a new header file for phy/switch?
Quoted 14 lines
+/*
+ * Ethernet Driver configuration
+ */
+#ifdefCONFIG_CMD_NET
+#defineCONFIG_NETCONSOLE/* include NetConsole
support */
+#defineCONFIG_NET_MULTI/* specify more that
one ports available */
+#defineCONFIG_MII/* expose smi
ove miiphy interface */
+#defineCONFIG_KIRKWOOD_EGIGA/* Enable kirkwood Gbe
Controller Driver */
Quoted 2 lines
This EGIGA driver hasn't been accepted yet. In fact, I think you've only sent one spin. It needs to be in before this board...
You are correct,
I am ready with the latest spin, but it has close dependency with kirkwood SoC layer, once this gets through I had a plan to release egiga driver patch. BTW code builds cleanly without egiga driver so I do not want to remove this :-) since it will be required afterward once kirkwood_egiga driver gets in. Any suggestion welcomed ???
Regards..
Prafulla . .
PATCH v5 1/1 Marvell MV88F6281GTW_GE Board support
Hi Prafulla,
Quoted 10 lines · Prafulla Wadaskar
Quoted 10 lines
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
++#include <
common.h>
+#include <../drivers/net/phy/mv88e61xx.h>
Quoted 8 lines
Quoted 3 lines
If this header is meant to be public it should be in "include". Sorry I didn't catch that earlier. <snip>
This header has some public and some driver specific information Only a configuration structure in this file is needed here, I can put it in
netdev.hbut I didn't find such implementation there. How about creating a new header file for phy/switch?
I think it's appropriate to put the struct definition and public prototypes in netdev.h. There's a lot of work in progress regarding PHYs, and I may move the prototypes later, but for now netdev is it. Unless the driver-specific stuff will be used in the future by other drivers, we may as well move it back to the .c file. I know, I know, I made you create the header file in the first place :) Would you believe that some people have called me indecisive?
Quoted 17 lines
Quoted 15 lines
+/*
+ * Ethernet Driver configuration
+ */
+#ifdefCONFIG_CMD_NET
+#defineCONFIG_NETCONSOLE/* include NetConsole
support */
+#defineCONFIG_NET_MULTI/* specify more that
one ports available */
+#defineCONFIG_MII/* expose smi
ove miiphy interface */
+#defineCONFIG_KIRKWOOD_EGIGA/* Enable kirkwood Gbe
Controller Driver */Quoted 2 lines
This EGIGA driver hasn't been accepted yet. In fact, I think you've only sent one spin. It needs to be in before this board...
Quoted 8 lines
You are correct,
I am ready with the latest spin, but it has close dependency with kirkwood SoC layer, once this gets through I had a plan to release egiga driver patch. BTW code builds cleanly without egiga driver so I do not want to remove this :-) since it will be required afterward oncekirkwood_egigadriver gets in.
Any suggestion welcomed ???
No, this seems OK. Like you say, it builds cleanly without. As long as they make it into the same release everything should be cool.
Quoted 4 lines
Regards..
Prafulla . .
Thanks for all your hard work.
regards,
Ben
PATCH v5 1/1 Marvell MV88F6281GTW_GE Board support
Quoted 15 lines
>
> +#include <common.h>
> +#include <../drivers/net/phy/mv88e61xx.h>
>
> If this header is meant to be public it should be in > "include". Sorry I didn't catch that earlier. > <snip>This header has some public and some driver specific information Only a configuration structure in this file is needed here, I can put it in
netdev.hbut I didn't find such
implementation there.
How about creating a new header file for phy/switch?
Quoted 8 lines
I think it's appropriate to put the struct definition and public prototypes in
netdev.h. There's a lot of work in progress regarding PHYs, and I may move the prototypes later, but for now netdev is it. Unless the driver-specific stuff will be used in the future by other drivers, we may as well move it back to the .c file. I know, I know, I made you create the header file in the first place :)
Would you believe that some people have called me indecisive?
Dear Ben, that's okay,
For evolving projects like u-boot, the positive progress happens in this direction only. How do we improve if we don't experiment... :-)
Currently there is only switch_init function header in netdev.h I will put a struct definition too. Thus we can remove mv88361xx.h dependency in board specific files
Just let me know - shall I send a delta for this or clean patch v9 for MV88E61XX driver? If I send you clean patch, you may need to revert earlier patch on your branch
Regards..
Prafulla . .
Quoted 1 line
PATCH v5 1/1 Marvell MV88F6281GTW_GE Board support
Quoted 28 lines · Prafulla Wadaskar
Quoted 15 lines
>
> +#include <common.h>
> +#include <../drivers/net/phy/mv88e61xx.h>
>
> If this header is meant to be public it should be in > "include". Sorry I didn't catch that earlier. > <snip>This header has some public and some driver specific information Only a configuration structure in this file is needed here, I can put it in
netdev.hbut I didn't find such
implementation there.
How about creating a new header file for phy/switch?Quoted 8 lines
I think it's appropriate to put the struct definition and public prototypes in
netdev.h. There's a lot of work in progress regarding PHYs, and I may move the prototypes later, but for now netdev is it. Unless the driver-specific stuff will be used in the future by other drivers, we may as well move it back to the .c file. I know, I know, I made you create the header file in the first place :)
Would you believe that some people have called me indecisive?Dear Ben, that's okay,
For evolving projects like u-boot, the positive progress happens in this direction only.
How do we improve if we don't experiment... :-)
Quoted 9 lines
Currently there is only
switch_initfunction header innetdev.hI will put a struct definition too.
Thus we can removemv88361xx.hdependency in board specific filesJust let me know - shall I send a delta for this or clean patch v9 for MV88E61XX driver?
If I send you clean patch, you may need to revert earlier patch on your branch
Either is fine with me, although since a v9 would probably be cleaner.
Quoted 5 lines
Regards..
Prafulla . .Quoted 1 line
regards,Ben