[U-Boot] [U-Boot, v1] drivers: ahci: write upper 32 bits for clb and fis registers
Tom Rini
trini at konsulko.com
Wed Sep 13 13:23:46 UTC 2017
On Wed, Sep 06, 2017 at 09:59:35AM -0700, Suneel Garapati wrote:
> If 64-bit capability is supported, commandlistbase and fis base
> should be split as lower32 and upper32. upper32 should be
> written to PORT_(LST/FIS)_ADDR_HI.
>
> Signed-off-by: Suneel Garapati <suneelglinux at gmail.com>
> Reviewed-by: Simon Glass <sjg at chromium.org>
> ---
>
> Changes v1:
> - add macro definitions for LOWER32, UPPER32
This introduces warnings on 32bit platforms:
In file included from /home/trini/work/u-boot/u-boot/arch/powerpc/include/asm/fsl_lbc.h:465:0,
from /home/trini/work/u-boot/u-boot/include/mpc86xx.h:10,
from /home/trini/work/u-boot/u-boot/arch/powerpc/include/asm/ppc.h:20,
from /home/trini/work/u-boot/u-boot/arch/powerpc/include/asm/u-boot.h:19,
from /home/trini/work/u-boot/u-boot/include/image.h:42,
from /home/trini/work/u-boot/u-boot/include/common.h:36,
from /home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:12:
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c: In function ‘ahci_port_start’:
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:31:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define UPPER32(val) (u32)(((u64)(val) & 0xFFFFFFFF00000000ULL) >> 32)
^
/home/trini/work/u-boot/u-boot/arch/powerpc/include/asm/io.h:34:57: note: in definition of macro ‘writel’
#define writel(b,addr) out_le32((volatile u32 *)(addr),(b))
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:614:3: note: in expansion of macro ‘writel_with_flush’
writel_with_flush(cpu_to_le32(UPPER32(pp->cmd_slot)),
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/big_endian.h:34:43: note: in expansion of macro ‘__swab32’
#define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/generic.h:89:21: note: in expansion of macro ‘__cpu_to_le32’
#define cpu_to_le32 __cpu_to_le32
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:614:33: note: in expansion of macro ‘UPPER32’
writel_with_flush(cpu_to_le32(UPPER32(pp->cmd_slot)),
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:31:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define UPPER32(val) (u32)(((u64)(val) & 0xFFFFFFFF00000000ULL) >> 32)
^
/home/trini/work/u-boot/u-boot/arch/powerpc/include/asm/io.h:34:57: note: in definition of macro ‘writel’
#define writel(b,addr) out_le32((volatile u32 *)(addr),(b))
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:614:3: note: in expansion of macro ‘writel_with_flush’
writel_with_flush(cpu_to_le32(UPPER32(pp->cmd_slot)),
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/swab.h:86:2: note: in expansion of macro ‘___swab32’
___swab32((x)) : \
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/big_endian.h:34:43: note: in expansion of macro ‘__swab32’
#define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/generic.h:89:21: note: in expansion of macro ‘__cpu_to_le32’
#define cpu_to_le32 __cpu_to_le32
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:614:33: note: in expansion of macro ‘UPPER32’
writel_with_flush(cpu_to_le32(UPPER32(pp->cmd_slot)),
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:31:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define UPPER32(val) (u32)(((u64)(val) & 0xFFFFFFFF00000000ULL) >> 32)
^
/home/trini/work/u-boot/u-boot/arch/powerpc/include/asm/io.h:34:57: note: in definition of macro ‘writel’
#define writel(b,addr) out_le32((volatile u32 *)(addr),(b))
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:614:3: note: in expansion of macro ‘writel_with_flush’
writel_with_flush(cpu_to_le32(UPPER32(pp->cmd_slot)),
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/swab.h:86:2: note: in expansion of macro ‘___swab32’
___swab32((x)) : \
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/big_endian.h:34:43: note: in expansion of macro ‘__swab32’
#define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/generic.h:89:21: note: in expansion of macro ‘__cpu_to_le32’
#define cpu_to_le32 __cpu_to_le32
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:614:33: note: in expansion of macro ‘UPPER32’
writel_with_flush(cpu_to_le32(UPPER32(pp->cmd_slot)),
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:31:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define UPPER32(val) (u32)(((u64)(val) & 0xFFFFFFFF00000000ULL) >> 32)
^
/home/trini/work/u-boot/u-boot/arch/powerpc/include/asm/io.h:34:57: note: in definition of macro ‘writel’
#define writel(b,addr) out_le32((volatile u32 *)(addr),(b))
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:614:3: note: in expansion of macro ‘writel_with_flush’
writel_with_flush(cpu_to_le32(UPPER32(pp->cmd_slot)),
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/swab.h:86:2: note: in expansion of macro ‘___swab32’
___swab32((x)) : \
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/big_endian.h:34:43: note: in expansion of macro ‘__swab32’
#define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/generic.h:89:21: note: in expansion of macro ‘__cpu_to_le32’
#define cpu_to_le32 __cpu_to_le32
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:614:33: note: in expansion of macro ‘UPPER32’
writel_with_flush(cpu_to_le32(UPPER32(pp->cmd_slot)),
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:31:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define UPPER32(val) (u32)(((u64)(val) & 0xFFFFFFFF00000000ULL) >> 32)
^
/home/trini/work/u-boot/u-boot/arch/powerpc/include/asm/io.h:34:57: note: in definition of macro ‘writel’
#define writel(b,addr) out_le32((volatile u32 *)(addr),(b))
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:614:3: note: in expansion of macro ‘writel_with_flush’
writel_with_flush(cpu_to_le32(UPPER32(pp->cmd_slot)),
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/swab.h:86:2: note: in expansion of macro ‘___swab32’
___swab32((x)) : \
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/big_endian.h:34:43: note: in expansion of macro ‘__swab32’
#define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/generic.h:89:21: note: in expansion of macro ‘__cpu_to_le32’
#define cpu_to_le32 __cpu_to_le32
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:614:33: note: in expansion of macro ‘UPPER32’
writel_with_flush(cpu_to_le32(UPPER32(pp->cmd_slot)),
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:31:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define UPPER32(val) (u32)(((u64)(val) & 0xFFFFFFFF00000000ULL) >> 32)
^
/home/trini/work/u-boot/u-boot/arch/powerpc/include/asm/io.h:34:57: note: in definition of macro ‘writel’
#define writel(b,addr) out_le32((volatile u32 *)(addr),(b))
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:614:3: note: in expansion of macro ‘writel_with_flush’
writel_with_flush(cpu_to_le32(UPPER32(pp->cmd_slot)),
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/big_endian.h:34:43: note: in expansion of macro ‘__swab32’
#define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/generic.h:89:21: note: in expansion of macro ‘__cpu_to_le32’
#define cpu_to_le32 __cpu_to_le32
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:614:33: note: in expansion of macro ‘UPPER32’
writel_with_flush(cpu_to_le32(UPPER32(pp->cmd_slot)),
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:30:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define LOWER32(val) (u32)((u64)(val) & 0xFFFFFFFF)
^
/home/trini/work/u-boot/u-boot/arch/powerpc/include/asm/io.h:34:57: note: in definition of macro ‘writel’
#define writel(b,addr) out_le32((volatile u32 *)(addr),(b))
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:616:2: note: in expansion of macro ‘writel_with_flush’
writel_with_flush(cpu_to_le32(LOWER32(pp->cmd_slot)),
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/big_endian.h:34:43: note: in expansion of macro ‘__swab32’
#define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/generic.h:89:21: note: in expansion of macro ‘__cpu_to_le32’
#define cpu_to_le32 __cpu_to_le32
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:616:32: note: in expansion of macro ‘LOWER32’
writel_with_flush(cpu_to_le32(LOWER32(pp->cmd_slot)),
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:30:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define LOWER32(val) (u32)((u64)(val) & 0xFFFFFFFF)
^
/home/trini/work/u-boot/u-boot/arch/powerpc/include/asm/io.h:34:57: note: in definition of macro ‘writel’
#define writel(b,addr) out_le32((volatile u32 *)(addr),(b))
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:616:2: note: in expansion of macro ‘writel_with_flush’
writel_with_flush(cpu_to_le32(LOWER32(pp->cmd_slot)),
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/swab.h:86:2: note: in expansion of macro ‘___swab32’
___swab32((x)) : \
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/big_endian.h:34:43: note: in expansion of macro ‘__swab32’
#define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/generic.h:89:21: note: in expansion of macro ‘__cpu_to_le32’
#define cpu_to_le32 __cpu_to_le32
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:616:32: note: in expansion of macro ‘LOWER32’
writel_with_flush(cpu_to_le32(LOWER32(pp->cmd_slot)),
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:30:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define LOWER32(val) (u32)((u64)(val) & 0xFFFFFFFF)
^
/home/trini/work/u-boot/u-boot/arch/powerpc/include/asm/io.h:34:57: note: in definition of macro ‘writel’
#define writel(b,addr) out_le32((volatile u32 *)(addr),(b))
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:616:2: note: in expansion of macro ‘writel_with_flush’
writel_with_flush(cpu_to_le32(LOWER32(pp->cmd_slot)),
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/swab.h:86:2: note: in expansion of macro ‘___swab32’
___swab32((x)) : \
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/big_endian.h:34:43: note: in expansion of macro ‘__swab32’
#define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/generic.h:89:21: note: in expansion of macro ‘__cpu_to_le32’
#define cpu_to_le32 __cpu_to_le32
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:616:32: note: in expansion of macro ‘LOWER32’
writel_with_flush(cpu_to_le32(LOWER32(pp->cmd_slot)),
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:30:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define LOWER32(val) (u32)((u64)(val) & 0xFFFFFFFF)
^
/home/trini/work/u-boot/u-boot/arch/powerpc/include/asm/io.h:34:57: note: in definition of macro ‘writel’
#define writel(b,addr) out_le32((volatile u32 *)(addr),(b))
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:616:2: note: in expansion of macro ‘writel_with_flush’
writel_with_flush(cpu_to_le32(LOWER32(pp->cmd_slot)),
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/swab.h:86:2: note: in expansion of macro ‘___swab32’
___swab32((x)) : \
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/big_endian.h:34:43: note: in expansion of macro ‘__swab32’
#define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/generic.h:89:21: note: in expansion of macro ‘__cpu_to_le32’
#define cpu_to_le32 __cpu_to_le32
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:616:32: note: in expansion of macro ‘LOWER32’
writel_with_flush(cpu_to_le32(LOWER32(pp->cmd_slot)),
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:30:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define LOWER32(val) (u32)((u64)(val) & 0xFFFFFFFF)
^
/home/trini/work/u-boot/u-boot/arch/powerpc/include/asm/io.h:34:57: note: in definition of macro ‘writel’
#define writel(b,addr) out_le32((volatile u32 *)(addr),(b))
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:616:2: note: in expansion of macro ‘writel_with_flush’
writel_with_flush(cpu_to_le32(LOWER32(pp->cmd_slot)),
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/swab.h:86:2: note: in expansion of macro ‘___swab32’
___swab32((x)) : \
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/big_endian.h:34:43: note: in expansion of macro ‘__swab32’
#define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/generic.h:89:21: note: in expansion of macro ‘__cpu_to_le32’
#define cpu_to_le32 __cpu_to_le32
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:616:32: note: in expansion of macro ‘LOWER32’
writel_with_flush(cpu_to_le32(LOWER32(pp->cmd_slot)),
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:30:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define LOWER32(val) (u32)((u64)(val) & 0xFFFFFFFF)
^
/home/trini/work/u-boot/u-boot/arch/powerpc/include/asm/io.h:34:57: note: in definition of macro ‘writel’
#define writel(b,addr) out_le32((volatile u32 *)(addr),(b))
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:616:2: note: in expansion of macro ‘writel_with_flush’
writel_with_flush(cpu_to_le32(LOWER32(pp->cmd_slot)),
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/big_endian.h:34:43: note: in expansion of macro ‘__swab32’
#define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
^
/home/trini/work/u-boot/u-boot/include/linux/byteorder/generic.h:89:21: note: in expansion of macro ‘__cpu_to_le32’
#define cpu_to_le32 __cpu_to_le32
^
/home/trini/work/u-boot/u-boot/drivers/ata/ahci.c:616:32: note: in expansion of macro ‘LOWER32’
writel_with_flush(cpu_to_le32(LOWER32(pp->cmd_slot)),
^
Try building for ls1021aqds_sdcard_qspi for example. Thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170913/bc13c5d1/attachment.sig>
More information about the U-Boot
mailing list