BLOCK: Add freescale IMX51 PATA driver
Subsystems (2)
PATCH v2 1/2 BLOCK: Add freescale IMX51 PATA driver
---
v2: Fixed line-too-long bugs as proposed by Stefano
drivers/block/Makefile | 1 + drivers/block/mxc_ata.c | 149 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 150 insertions(+), 0 deletions(-) create mode 100644 drivers/block/mxc_ata.c
drivers/block/Makefile +1 -0
@@ -31,6 +31,7 @@ COBJS-$(CONFIG_FSL_SATA) += fsl_sata.o COBJS-$(CONFIG_LIBATA) += libata.o COBJS-$(CONFIG_CMD_MG_DISK) += mg_disk.o COBJS-$(CONFIG_MVSATA_IDE) += mvsata_ide.o +COBJS-$(CONFIG_MX51_PATA) += mxc_ata.o COBJS-$(CONFIG_PATA_BFIN) += pata_bfin.o COBJS-$(CONFIG_SATA_DWC) += sata_dwc.o COBJS-$(CONFIG_SATA_SIL3114) += sata_sil3114.o
drivers/block/mxc_ata.c new file +149 -0
149 lines not on this page · raw message
Signature · 1 line
1.7.2.3
PATCH 2/2 iMX5: EfikaMX: Preliminary board support
Supported:
MMC
IDE
PMIC
SPI flash
LEDs
I can boot the kernel supplied by freescale/genesi with this from MMC card and/or PATA disk.
---
v2: Fixed line-too-long, MAINTAINERs etc. (I hope everything but the PMIC*) bugs as proposed by Stefano.
As for the PMIC, other boards don't use any #defines for those constants either, which obviously doens't mean it's right. I'd like to take a peek into the MX13892 datasheet to properly name the values. Maybe I just mislooked on the FSL website.
MAINTAINERS | 1 + board/efikamx/Makefile | 52 ++++ board/efikamx/config.mk | 25 ++ board/efikamx/efikamx.c | 695 ++++++++++++++++++++++++++++++++++++++++++++ board/efikamx/imximage.cfg | 122 ++++++++ boards.cfg | 1 + include/configs/efikamx.h | 232 +++++++++++++++ 7 files changed, 1128 insertions(+), 0 deletions(-) create mode 100644 board/efikamx/Makefile create mode 100644 board/efikamx/config.mk create mode 100644 board/efikamx/efikamx.c create mode 100644 board/efikamx/imximage.cfg create mode 100644 include/configs/efikamx.h
MAINTAINERS +1 -0
@@ -824,6 +824,7 @@ Marek Vasut <[email protected]> palmtc xscale vpac270 xscale zipitz2 xscale + efikamx i.MX51 Hugo Villeneuve <[email protected]>
board/efikamx/Makefile new file +52 -0
52 lines not on this page · raw message
board/efikamx/config.mk new file +25 -0
@@ -0,0 +1,25 @@ +# +# Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved. +# +# 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., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +CONFIG_SYS_TEXT_BASE = 0x97800000 +IMX_CONFIG = $(SRCTREE)/board/$(BOARDDIR)/imximage.cfg +ALL += $(obj)u-boot.imx
board/efikamx/efikamx.c new file +695 -0
695 lines not on this page · raw message
board/efikamx/imximage.cfg new file +122 -0
122 lines not on this page · raw message
boards.cfg +1 -0
@@ -105,6 +105,7 @@ magnesium arm arm926ejs imx27lite logicpd omap5912osk arm arm926ejs - ti omap edminiv2 arm arm926ejs - LaCie orion5x ca9x4_ct_vxp arm armv7 vexpress armltd +efikamx arm armv7 efikamx - mx5 mx51evk arm armv7 mx51evk freescale mx5 vision2 arm armv7 vision2 ttcontrol mx5 omap3_overo arm armv7 overo - omap3
include/configs/efikamx.h new file +232 -0
232 lines not on this page · raw message
Signature · 1 line
1.7.2.3
PATCH 2/2 iMX5: EfikaMX: Preliminary board support
Quoted 2 lines · Marek Vasut
As for the PMIC, other boards don't use any #defines for those constants either, which obviously doens't mean it's right.
Well, this is not true. You use in yourd board a lot of these constants. There are only a few of them that are not used and
Review
Quoted 2 lines
(quoted diff) +2
-0+ + /* NOTE: if (is_soc_rev(CHIP_REV_2_0) >= 0) */
You can drop this line
board/efikamx/efikamx.c line 211
Quoted 5 lines
board/efikamx/efikamx.c new file +5
-0+ +/* Set core voltage to 1.1V */ + val =pmic_reg_read (REG_SW_0 ); + val = (val & (~0x1F )) |0x14 ; +pmic_reg_write (REG_SW_0 , val);
Values are defined in Table 47 in MC13892.h manual. The low level is 0.6 Volt, that corresponds to "0x0", and each bit increments the voltage by 25mV. I can suggest to add a macro to mc13892.h that return the value for register when the desired voltage (in millivolt) is passed.
board/efikamx/efikamx.c line 216
Quoted 5 lines
board/efikamx/efikamx.c new file +5
-0+ +/* Setup VCC (SW2) to 1.25 */ + val =pmic_reg_read (REG_SW_1 ); + val = (val & (~0x1F )) |0x1A ; +pmic_reg_write (REG_SW_1 , val);
..and use it here, too.
board/efikamx/efikamx.c line 222
Quoted 6 lines
board/efikamx/efikamx.c new file +6
-0+ +/* Setup 1V2_DIG1 (SW3) to 1.25 */ + val =pmic_reg_read (REG_SW_2 ); + val = (val & (~0x1F )) |0x1A ; +pmic_reg_write (REG_SW_2 , val); +udelay (50 );
..and here.
Quoted 1 line
+/******************************************************************************
I have not checked before, but this is not the coding style for multiline comments.
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================
PATCH 2/2 iMX5: EfikaMX: Preliminary board support
Quoted 31 lines · On Sunday 16 January 2011 16:21:34 Stefano Babic wrote:
Quoted 2 lines · Marek Vasut
As for the PMIC, other boards don't use any #defines for those constants either, which obviously doens't mean it's right.
Well, this is not true. You use in yourd board a lot of these constants. There are only a few of them that are not used and
Review
Quoted 2 lines
(quoted diff) +2
-0+ + /* NOTE: if (is_soc_rev(CHIP_REV_2_0) >= 0) */You can drop this line
board/efikamx/efikamx.c line 211
Quoted 5 lines
board/efikamx/efikamx.c new file +5
-0+ +/* Set core voltage to 1.1V */ + val =pmic_reg_read (REG_SW_0 ); + val = (val & (~0x1F )) |0x14 ; +pmic_reg_write (REG_SW_0 , val);Values are defined in Table 47 in
MC13892.hmanual. The low level is 0.6 Volt, that corresponds to "0x0", and each bit increments the voltage by 25mV. I can suggest to add a macro tomc13892.hthat return the value for register when the desired voltage (in millivolt) is passed.board/efikamx/efikamx.c line 216
Quoted 5 lines
board/efikamx/efikamx.c new file +5
-0+ +/* Setup VCC (SW2) to 1.25 */ + val =pmic_reg_read (REG_SW_1 ); + val = (val & (~0x1F )) |0x1A ; +pmic_reg_write (REG_SW_1 , val);..and use it here, too.
Quoted 8 lines
board/efikamx/efikamx.c line 222
Quoted 6 lines
board/efikamx/efikamx.c new file +6
-0+ +/* Setup 1V2_DIG1 (SW3) to 1.25 */ + val =pmic_reg_read (REG_SW_2 ); + val = (val & (~0x1F )) |0x1A ; +pmic_reg_write (REG_SW_2 , val); +udelay (50 );..and here.
Fixed
Quoted 6 lines
Quoted 3 lines
+/***********************************************************************
*******I have not checked before, but this is not the coding style for multiline comments.
Well it's more of a section separator, that's why this bold stuff. I'd prefer to leave it there for readability's sake.
Cheers
PATCH 2/2 iMX5: EfikaMX: Preliminary board support
Dear Marek Vasut,
Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 6 lines
Quoted 3 lines
+/***********************************************************************
*******I have not checked before, but this is not the coding style for multiline comments.
Well it's more of a section separator, that's why this bold stuff. I'd prefer to leave it there for readability's sake.
Please fix it.
Best regards,
Wolfgang Denk
Signature · 7 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
They weren't that important. They were merely at the top. The people
who really run organizations are usually found several levels down,
where it's still possible to get things done.
- Terry Pratchett, _Small Gods_PATCH v2 1/2 BLOCK: Add freescale IMX51 PATA driver
In reply to Marek VasutAm 13.01.2011 18:27, schrieb Marek Vasut:
Quoted 8 lines
Signed-off-by Marek Vasut <[email protected]>---
v2: Fixed line-too-long bugs as proposed by Stefanodrivers/block/Makefile | 1 + drivers/block/mxc_ata.c | 149 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 150 insertions(+), 0 deletions(-) create mode 100644 drivers/block/mxc_ata.c
Regards,
Stefano
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================
PATCH v2 1/2 BLOCK: Add freescale IMX51 PATA driver
Dear stefano babic,
Quoted 11 lines · In message <[email protected]> you wrote:
Am 13.01.2011 18:27, schrieb Marek Vasut:
Quoted 8 lines
Signed-off-by Marek Vasut <[email protected]>---
v2: Fixed line-too-long bugs as proposed by Stefanodrivers/block/Makefile | 1 + drivers/block/mxc_ata.c | 149 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 150 insertions(+), 0 deletions(-) create mode 100644 drivers/block/mxc_ata.cAcked-by Stefano Babic <[email protected]>
Stefano, please pull through IMX tree. Thanks.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Star Trek Lives!