diff mbox

[U-Boot,2/2] ARM: O5/dra7xx: Add SATA boot support

Message ID 1390939305-13973-2-git-send-email-dmurphy@ti.com
State Superseded
Headers show

Commit Message

Dan Murphy Jan. 28, 2014, 8:01 p.m. UTC
Add the SATA boot support for OMAP5 and dra7xx.

Renamed the omap_sata_init to the common init_sata(int dev)
for commonality in with sata stack.

Added the ROM boot device ID for SATA.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
---
 arch/arm/cpu/armv7/omap-common/sata.c |    3 ++-
 arch/arm/include/asm/arch-omap5/spl.h |    1 +
 board/ti/dra7xx/evm.c                 |    2 +-
 board/ti/omap5_uevm/evm.c             |    2 +-
 4 files changed, 5 insertions(+), 3 deletions(-)

Comments

Roger Quadros Jan. 29, 2014, 9:03 a.m. UTC | #1
Hi Dan,

On 01/28/2014 10:01 PM, Dan Murphy wrote:
> Add the SATA boot support for OMAP5 and dra7xx.
> 
> Renamed the omap_sata_init to the common init_sata(int dev)
> for commonality in with sata stack.
> 
> Added the ROM boot device ID for SATA.
> 
> Signed-off-by: Dan Murphy <dmurphy@ti.com>
> ---
>  arch/arm/cpu/armv7/omap-common/sata.c |    3 ++-
>  arch/arm/include/asm/arch-omap5/spl.h |    1 +
>  board/ti/dra7xx/evm.c                 |    2 +-
>  board/ti/omap5_uevm/evm.c             |    2 +-
>  4 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/omap-common/sata.c b/arch/arm/cpu/armv7/omap-common/sata.c
> index f5468c4..cad4fee 100644
> --- a/arch/arm/cpu/armv7/omap-common/sata.c
> +++ b/arch/arm/cpu/armv7/omap-common/sata.c
> @@ -12,6 +12,7 @@
>  #include <scsi.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/sata.h>
> +#include <sata.h>
>  #include <asm/io.h>
>  #include "pipe3-phy.h"
>  
> @@ -31,7 +32,7 @@ struct omap_pipe3 sata_phy = {
>  	.dpll_map = dpll_map_sata,
>  };
>  
> -int omap_sata_init(void)
> +int init_sata(int dev)
>  {
>  	int ret;
>  	u32 val;
> diff --git a/arch/arm/include/asm/arch-omap5/spl.h b/arch/arm/include/asm/arch-omap5/spl.h
> index 2d5a62e..4a279cf 100644
> --- a/arch/arm/include/asm/arch-omap5/spl.h
> +++ b/arch/arm/include/asm/arch-omap5/spl.h
> @@ -15,6 +15,7 @@
>  #define BOOT_DEVICE_MMC1        5
>  #define BOOT_DEVICE_MMC2        6
>  #define BOOT_DEVICE_MMC2_2	7
> +#define BOOT_DEVICE_SATA	9
>  #define BOOT_DEVICE_SPI		10
>  #define BOOT_DEVICE_UART	0x43
>  
> diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
> index 1b60b8f..38d656c 100644
> --- a/board/ti/dra7xx/evm.c
> +++ b/board/ti/dra7xx/evm.c
> @@ -80,7 +80,7 @@ int board_init(void)
>  
>  int board_late_init(void)
>  {
> -	omap_sata_init();
> +	init_sata(0);
>  	return 0;
>  }
>  
> diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c
> index af854da..abf7fe3 100644
> --- a/board/ti/omap5_uevm/evm.c
> +++ b/board/ti/omap5_uevm/evm.c
> @@ -70,7 +70,7 @@ int board_init(void)
>  
>  int board_late_init(void)
>  {
> -	omap_sata_init();
> +	init_sata(0);
>  	return 0;
>  }
>  
> 
Still need to get rid of omap_sata_init() from arch/arm/include/asm/arch-omap5/sata.h

cheers,
-roger
Dan Murphy Jan. 29, 2014, 1:04 p.m. UTC | #2
Roger

On 01/29/2014 03:03 AM, Roger Quadros wrote:
> Hi Dan,
>
> On 01/28/2014 10:01 PM, Dan Murphy wrote:
>> Add the SATA boot support for OMAP5 and dra7xx.
>>
>> Renamed the omap_sata_init to the common init_sata(int dev)
>> for commonality in with sata stack.
>>
>> Added the ROM boot device ID for SATA.
>>
>> Signed-off-by: Dan Murphy <dmurphy@ti.com>
>> ---
>>  arch/arm/cpu/armv7/omap-common/sata.c |    3 ++-
>>  arch/arm/include/asm/arch-omap5/spl.h |    1 +
>>  board/ti/dra7xx/evm.c                 |    2 +-
>>  board/ti/omap5_uevm/evm.c             |    2 +-
>>  4 files changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/arm/cpu/armv7/omap-common/sata.c b/arch/arm/cpu/armv7/omap-common/sata.c
>> index f5468c4..cad4fee 100644
>> --- a/arch/arm/cpu/armv7/omap-common/sata.c
>> +++ b/arch/arm/cpu/armv7/omap-common/sata.c
>> @@ -12,6 +12,7 @@
>>  #include <scsi.h>
>>  #include <asm/arch/clock.h>
>>  #include <asm/arch/sata.h>
>> +#include <sata.h>
>>  #include <asm/io.h>
>>  #include "pipe3-phy.h"
>>  
>> @@ -31,7 +32,7 @@ struct omap_pipe3 sata_phy = {
>>  	.dpll_map = dpll_map_sata,
>>  };
>>  
>> -int omap_sata_init(void)
>> +int init_sata(int dev)
>>  {
>>  	int ret;
>>  	u32 val;
>> diff --git a/arch/arm/include/asm/arch-omap5/spl.h b/arch/arm/include/asm/arch-omap5/spl.h
>> index 2d5a62e..4a279cf 100644
>> --- a/arch/arm/include/asm/arch-omap5/spl.h
>> +++ b/arch/arm/include/asm/arch-omap5/spl.h
>> @@ -15,6 +15,7 @@
>>  #define BOOT_DEVICE_MMC1        5
>>  #define BOOT_DEVICE_MMC2        6
>>  #define BOOT_DEVICE_MMC2_2	7
>> +#define BOOT_DEVICE_SATA	9
>>  #define BOOT_DEVICE_SPI		10
>>  #define BOOT_DEVICE_UART	0x43
>>  
>> diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
>> index 1b60b8f..38d656c 100644
>> --- a/board/ti/dra7xx/evm.c
>> +++ b/board/ti/dra7xx/evm.c
>> @@ -80,7 +80,7 @@ int board_init(void)
>>  
>>  int board_late_init(void)
>>  {
>> -	omap_sata_init();
>> +	init_sata(0);
>>  	return 0;
>>  }
>>  
>> diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c
>> index af854da..abf7fe3 100644
>> --- a/board/ti/omap5_uevm/evm.c
>> +++ b/board/ti/omap5_uevm/evm.c
>> @@ -70,7 +70,7 @@ int board_init(void)
>>  
>>  int board_late_init(void)
>>  {
>> -	omap_sata_init();
>> +	init_sata(0);
>>  	return 0;
>>  }
>>  
>>
> Still need to get rid of omap_sata_init() from arch/arm/include/asm/arch-omap5/sata.h

Will do in v2

> cheers,
> -roger
diff mbox

Patch

diff --git a/arch/arm/cpu/armv7/omap-common/sata.c b/arch/arm/cpu/armv7/omap-common/sata.c
index f5468c4..cad4fee 100644
--- a/arch/arm/cpu/armv7/omap-common/sata.c
+++ b/arch/arm/cpu/armv7/omap-common/sata.c
@@ -12,6 +12,7 @@ 
 #include <scsi.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sata.h>
+#include <sata.h>
 #include <asm/io.h>
 #include "pipe3-phy.h"
 
@@ -31,7 +32,7 @@  struct omap_pipe3 sata_phy = {
 	.dpll_map = dpll_map_sata,
 };
 
-int omap_sata_init(void)
+int init_sata(int dev)
 {
 	int ret;
 	u32 val;
diff --git a/arch/arm/include/asm/arch-omap5/spl.h b/arch/arm/include/asm/arch-omap5/spl.h
index 2d5a62e..4a279cf 100644
--- a/arch/arm/include/asm/arch-omap5/spl.h
+++ b/arch/arm/include/asm/arch-omap5/spl.h
@@ -15,6 +15,7 @@ 
 #define BOOT_DEVICE_MMC1        5
 #define BOOT_DEVICE_MMC2        6
 #define BOOT_DEVICE_MMC2_2	7
+#define BOOT_DEVICE_SATA	9
 #define BOOT_DEVICE_SPI		10
 #define BOOT_DEVICE_UART	0x43
 
diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
index 1b60b8f..38d656c 100644
--- a/board/ti/dra7xx/evm.c
+++ b/board/ti/dra7xx/evm.c
@@ -80,7 +80,7 @@  int board_init(void)
 
 int board_late_init(void)
 {
-	omap_sata_init();
+	init_sata(0);
 	return 0;
 }
 
diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c
index af854da..abf7fe3 100644
--- a/board/ti/omap5_uevm/evm.c
+++ b/board/ti/omap5_uevm/evm.c
@@ -70,7 +70,7 @@  int board_init(void)
 
 int board_late_init(void)
 {
-	omap_sata_init();
+	init_sata(0);
 	return 0;
 }