sf: probe: Handle flash size properly incase of dual parallel
Handle flash size properly incase of dual parallel
The flash size has to be divided by 2 while checking
the flash size to enter 4byte mode and for bank
selection during init.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 28 Oct 2015 16:03:59 +0000 (17:03 +0100)]
spi: Add declaration for spi_flash_cmd_bp_unlock
This patch removes compilation warning:
+../drivers/mtd/spi/sf_probe.c: In function
'spi_flash_validate_params':
+../drivers/mtd/spi/sf_probe.c:402:3: warning: implicit declaration of
function 'spi_flash_cmd_bp_unlock' [-Wimplicit-function-declaration]
Also add missing flash parameter:
+../drivers/mtd/spi/sf_probe.c: In function 'spi_flash_validate_params':
+../drivers/mtd/spi/sf_probe.c:402:3: error: too few arguments to
function 'spi_flash_cmd_bp_unlock'
+ ret = spi_flash_cmd_bp_unlock();
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 28 Oct 2015 15:49:44 +0000 (16:49 +0100)]
usb: udc: Fix warnings on 64-bit builds
Cast u32 bit value to 64bit before recasting to 64bit pointer to avoid
pointer from integer cast size mismatch warnings.
Warning log:
+../drivers/usb/gadget/udc/udc-core.c: In function
‘usb_gadget_unmap_request’:
+../drivers/usb/gadget/udc/udc-core.c:68:19: warning: cast to pointer
from integer of different size [-Wint-to-pointer-cast]
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 28 Oct 2015 15:27:06 +0000 (16:27 +0100)]
net: gem: Build warning fixes for 64-bit
Cast pointers to unsigned long instead of a sized 32-bit type to avoid
pointer to integer cast size mismatch warnings.
Warning log:
drivers/net/zynq_gem.c: In function ‘zynq_gem_init’:
drivers/net/zynq_gem.c:354:7: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
((u32)(priv->rxbuffers) +
^
In file included from drivers/net/zynq_gem.c:19:0:
drivers/net/zynq_gem.c:360:10: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
writel((u32)priv->rx_bd, ®s->rxqbase);
^
./arch/arm/include/asm/io.h:146:34: note: in definition of macro
‘writel’
#define writel(v,c) ({ u32 __v = v; __iowmb(); __arch_putl(__v,c); __v;
})
^
drivers/net/zynq_gem.c:385:10: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
writel((u32)dummy_tx_bd, ®s->transmit_q1_ptr);
^
./arch/arm/include/asm/io.h:146:34: note: in definition of macro
‘writel’
#define writel(v,c) ({ u32 __v = v; __iowmb(); __arch_putl(__v,c); __v;
})
^
drivers/net/zynq_gem.c:386:10: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
writel((u32)dummy_rx_bd, ®s->receive_q1_ptr);
^
./arch/arm/include/asm/io.h:146:34: note: in definition of macro
‘writel’
#define writel(v,c) ({ u32 __v = v; __iowmb(); __arch_putl(__v,c); __v;
})
^
drivers/net/zynq_gem.c: In function ‘zynq_gem_send’:
drivers/net/zynq_gem.c:487:22: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
priv->tx_bd->addr = (u32)ptr;
^
In file included from drivers/net/zynq_gem.c:19:0:
drivers/net/zynq_gem.c:497:9: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
writel((u32)priv->tx_bd, ®s->txqbase);
^
./arch/arm/include/asm/io.h:146:34: note: in definition of macro
‘writel’
#define writel(v,c) ({ u32 __v = v; __iowmb(); __arch_putl(__v,c); __v;
})
^
drivers/net/zynq_gem.c:499:9: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
addr = (u32) ptr;
^
drivers/net/zynq_gem.c:504:9: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
addr = (u32)priv->rxbuffers;
^
drivers/net/zynq_gem.c: In function ‘zynq_gem_recv’:
drivers/net/zynq_gem.c:543:31: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
net_process_received_packet((u8 *)addr, frame_len);
^
drivers/net/zynq_gem.c: In function ‘zynq_gem_initialize’:
drivers/net/zynq_gem.c:622:35: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
priv->rx_bd = (struct emac_bd *)((u32)bd_space + BD_SEPRN_SPACE);
^
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 28 Oct 2015 15:00:38 +0000 (16:00 +0100)]
usb: dwc3: Fix warnings on 64-bit builds
Change aritmentics to use 64bit types to be compatible with 64bit
builds.
Compilation warnings:
drivers/usb/dwc3/ep0.c: In function ‘dwc3_ep0_start_trans’:
drivers/usb/dwc3/ep0.c:85:19: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
dwc3_flush_cache((int)trb, sizeof(*trb));
^
drivers/usb/dwc3/gadget.c: In function ‘dwc3_prepare_one_trb’:
drivers/usb/dwc3/gadget.c:775:19: warning: cast from pointer to integer
of different size [-Wpointer-to-int-cast]
dwc3_flush_cache((int)trb, sizeof(*trb));
^
drivers/usb/dwc3/core.c: In function ‘dwc3_setup_scratch_buffers’:
drivers/usb/dwc3/core.c:284:19: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
dma_unmap_single((void *)dwc->scratch_addr, dwc->nr_scratch *
^
drivers/usb/dwc3/core.c: In function ‘dwc3_free_scratch_buffers’:
drivers/usb/dwc3/core.c:299:19: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
dma_unmap_single((void *)dwc->scratch_addr, dwc->nr_scratch *
^
drivers/usb/dwc3/core.c: In function ‘dwc3_uboot_init’:
drivers/usb/dwc3/core.c:632:14: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
dwc->regs = (int *)(dwc3_dev->base + DWC3_GLOBALS_REGS_START);
^
drivers/usb/dwc3/ep0.c: In function ‘dwc3_ep0_complete_data’:
drivers/usb/dwc3/ep0.c:793:19: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
dwc3_flush_cache((int)trb, sizeof(*trb));
^
drivers/usb/dwc3/ep0.c:824:21: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
dwc3_flush_cache((int)trb, sizeof(*trb));
^
drivers/usb/dwc3/ep0.c:834:20: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
dwc3_flush_cache((int)dwc->ep0_bounce, DWC3_EP0_BOUNCE_SIZE);
^
CC lib/display_options.o
drivers/usb/dwc3/gadget.c: In function ‘dwc3_cleanup_done_reqs’:
drivers/usb/dwc3/gadget.c:1772:19: warning: cast from pointer to integer
of different size [-Wpointer-to-int-cast]
dwc3_flush_cache((int)trb, sizeof(*trb));
^
drivers/usb/dwc3/gadget.c: In function
‘dwc3_gadget_uboot_handle_interrupt’:
drivers/usb/dwc3/gadget.c:2673:21: warning: cast from pointer to integer
of different size [-Wpointer-to-int-cast]
dwc3_flush_cache((int)evt->buf, evt->length);
^
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 28 Oct 2015 14:55:50 +0000 (15:55 +0100)]
usb: xhci-zynqmp: Fix incorrect recasting
This patch fix these compatilation warnings:
drivers/usb/host/xhci-zynqmp.c: In function ‘xhci_hcd_init’:
LD drivers/dfu/built-in.o
drivers/usb/host/xhci-zynqmp.c:98:31: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
*hcor = (struct xhci_hcor *)((uint32_t) *hccr
^
drivers/usb/host/xhci-zynqmp.c:98:10: warning: cast to pointer from
integer of different size [-Wint-to-pointer-cast]
*hcor = (struct xhci_hcor *)((uint32_t) *hccr
^
In file included from drivers/usb/host/xhci-zynqmp.c:13:0:
drivers/usb/host/xhci-zynqmp.c:102:8: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
(uint32_t)*hccr, (uint32_t)*hcor,
^
include/common.h:109:26: note: in definition of macro ‘debug_cond’
printf(pr_fmt(fmt), ##args); \
^
drivers/usb/host/xhci-zynqmp.c:101:2: note: in expansion of macro
‘debug’
debug("zynqmp-xhci: init hccr %x and hcor %x hc_length %d\n",
^
drivers/usb/host/xhci-zynqmp.c:102:25: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
(uint32_t)*hccr, (uint32_t)*hcor,
^
include/common.h:109:26: note: in definition of macro ‘debug_cond’
printf(pr_fmt(fmt), ##args); \
^
drivers/usb/host/xhci-zynqmp.c:101:2: note: in expansion of macro
‘debug’
debug("zynqmp-xhci: init hccr %x and hcor %x hc_length %d\n",
^
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 28 Oct 2015 14:51:21 +0000 (15:51 +0100)]
usb: lthor: Specify correct parameter for sizeof type
This patch removes this warning:
CC drivers/usb/gadget/f_thor.o
drivers/usb/gadget/f_thor.c: In function ‘thor_tx_data’:
drivers/usb/gadget/f_thor.c:572:2: warning: format ‘%d’ expects argument
of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat=]
debug("%s: dev->in_req->length:%d to_cpy:%d\n", __func__,
^
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 28 Oct 2015 12:04:30 +0000 (13:04 +0100)]
dfu: Fix Specify correct parameter for sizeof type
Warning log:
drivers/dfu/dfu.c: In function ‘dfu_write’:
drivers/dfu/dfu.c:201:2: warning: format ‘%x’ expects argument of type
‘unsigned int’, but argument 8 has type ‘long int’ [-Wformat=]
debug("%s: name: %s buf: 0x%p size: 0x%x p_num: 0x%x offset: 0x%llx
bufoffset: 0x%x\n",
^
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 28 Oct 2015 10:07:48 +0000 (11:07 +0100)]
phy: ti: Add missing function declaration to phy.h
Fix compilation warning:
drivers/net/phy/phy.c: In function ‘phy_init’:
drivers/net/phy/phy.c:488:2: warning: implicit declaration of function
‘phy_ti_init’ [-Wimplicit-function-declaration]
phy_ti_init();
^
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 28 Oct 2015 10:00:47 +0000 (11:00 +0100)]
net: axi_emac: Fix parentheses around operand !
Fix these compilation warning by proper grouping:
In function 'axi_dma_init': drivers/net/xilinx_axi_emac.c:391:7:
warning: suggest parentheses around operand of '!' or change '&' to '&&'
or '!' to '~' [-Wparentheses]
if (!(in_be32(&priv->dmatx->control) |
^
In function 'axiemac_send': drivers/net/xilinx_axi_emac.c:501:21:
warning: suggest parentheses around operand of '!' or change '&' to '&&'
or '!' to '~' [-Wparentheses]
while (timeout && (!in_be32(&priv->dmatx->status) &
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 28 Oct 2015 09:56:39 +0000 (10:56 +0100)]
dm: sf: Add checking for MANUAL_RELOC code only
This fixes the patch:
"dm: sf: Add support for all targets which requires MANUAL_RELOC"
(sha1: 238448fed49cb1dae7ffd09939afeaa1918c408e)
to call the code only for manual relocation case.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
zynq-common: Define CONFIG_SYS_I2C_ZYNQ based on board config
Enable CONFIG_SYS_I2C_ZYNQ only if it has either I2C0 or I2C1
enabled in a board config.This fixes the issue of i2c error
during board init if board specific doesnt have either I2C0
or I2C1.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Tue, 27 Oct 2015 12:52:47 +0000 (13:52 +0100)]
dm: sf: Add support for all targets which requires MANUAL_RELOC
It is follow up patch based on
"dm: Add support for all targets which requires MANUAL_RELOC"
(sha1: 484fdf5ba058b07be5ca82763aa2b72063540ef3)
to update function pointers for DM.
Using post_bind is not ideal but it is one on current option what can be
used. Variable reloc_done has to be used do not call relocation after
every bind. Maybe new core functions should be introduced for this case.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Adds new entries to struct driver and struct uclass_driver without
extending code for manual relocation. This patch fixes it for all
architectures which requires MANUAL_RELOC.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Tue, 27 Oct 2015 12:36:42 +0000 (13:36 +0100)]
dm: spi: Add support for all targets which requires MANUAL_RELOC
It is follow up patch based on
"dm: Add support for all targets which requires MANUAL_RELOC"
(sha1: 484fdf5ba058b07be5ca82763aa2b72063540ef3)
to update function pointers for DM.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 21 Oct 2015 13:10:54 +0000 (15:10 +0200)]
ARM64: zynqmp: update the nand node with clock and chip select info
Added clock specification.
Added chip select information.
It is possible that the nand flash device(s) size can be > 4GB. So,
Increased
the address cycles property value to 2.
Since DC2 hw contains two flash devices and each flash size is 4GB,
modified the
partition table to accommodate the second flash and also added
partitions to
cover the whole flash size.
Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 21 Oct 2015 11:24:07 +0000 (13:24 +0200)]
ARM64: zynqmp: List all i2c muxes as separate buses for ZCU102
Simplify work with I2C muxes by definitely i2c bus topology.
Here is example of it:
ZynqMP> i2c bus
Bus 0: zynq_0
Bus 1: zynq_0->PCA9544A@0x75:0
Bus 2: zynq_0->PCA9544A@0x75:1
Bus 3: zynq_0->PCA9544A@0x75:2
Bus 4: zynq_1
Bus 5: zynq_1->PCA9548@0x74:0
Bus 6: zynq_1->PCA9548@0x74:1
Bus 7: zynq_1->PCA9548@0x74:2
Bus 8: zynq_1->PCA9548@0x74:3
Bus 9: zynq_1->PCA9548@0x74:4
Bus 10: zynq_1->PCA9548@0x75:0
Bus 11: zynq_1->PCA9548@0x75:1
Bus 12: zynq_1->PCA9548@0x75:2
Bus 13: zynq_1->PCA9548@0x75:3
Bus 14: zynq_1->PCA9548@0x75:4
Bus 15: zynq_1->PCA9548@0x75:5
Bus 16: zynq_1->PCA9548@0x75:6
Bus 17: zynq_1->PCA9548@0x75:7
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 7 Oct 2015 14:42:56 +0000 (16:42 +0200)]
net: zynq: Add support for different PHY interface types
MII is setup by default for all cases. The most of boards are using
RGMII but PHY drivers are not doing any specific setting that's why MII
setting was working file. With TI DP83867 is necessary to setup
paramaters based on interface type.
Use one setting per board for it which is something what will be removed
when driver is moved to DM.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Zynq has no priority queues.
ZynqMP requires this change to get network working.
This patch was not needed on ep108 for uknown reason even it should be
used.
Tested on Zynq and ZynqMP.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Mon, 5 Oct 2015 09:02:33 +0000 (11:02 +0200)]
zynqmp: Setup correct memory size for ep108
Move memory configuration to board configuration file to ensure memory
setup for every particular board.
Support 2GB ram for dc1 and dc2. Patch for extending it to 4GB will be
added when it is properly tested.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This patch adds support for Microchip part
SST26WF016B. This device needs unlock
block protection command to be sent for
all the erase and write ops to be successful.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Tue, 8 Sep 2015 15:20:01 +0000 (17:20 +0200)]
net: zynq: Change MDC setup for arm64
MDC setting depends on pclk input clocks which varies across SoC. This
driver is used by xilinx zynq and zynqmp SOC.
Origin 224 divider is coming from RTL3.1 setting. The latest RTL doesn't
require this setting on EP108.
Input clock frequence on silicon is 125MHz where divider 64 put
frequency below 2.5MHz requires by spec (125/64=1.95).
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Tue, 8 Sep 2015 15:07:01 +0000 (17:07 +0200)]
net: zynq: Fix MDC setting for zynq
Based on spec:
"MDC must not exceed 2.5 MHz (MDC is only active during MDIO read and
write operations)"
Zynq is running on 111MHz. Current setting is 32 which is 111/32=3.47
which is above of 2.5MHz.
Using 48 divider will give us correct setting according spec
(111/48=2.31).
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Tue, 8 Sep 2015 14:55:42 +0000 (16:55 +0200)]
net: zynq: Fix mdc clock division setting for 100Mbit/s
Using set and clear macro is incorrect because it is not overwritting
origin mdc clock division setup.
For example origin setup is 8(0b001) and new setup is 64(0b100) which
means 0b101 is setup which is 96 divider.
Using writel to rewrite all setting like for 1000Mbit/s case.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Tue, 8 Sep 2015 15:34:17 +0000 (17:34 +0200)]
net: zynq: Add missing const to wait_for_bit()
Remove compilation warning:
../drivers/net/zynq_gem.c:407:19: note: expected 'char *' but argument
is of type 'const char *'
../drivers/net/zynq_gem.c:476:8: warning: passing argument 1 of
'wait_for_bit' discards 'const' qualifier from pointer target type
[enabled by default]
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 3 Sep 2015 08:50:37 +0000 (10:50 +0200)]
ARM: zynqmp: Extend cache handling
- Add cache on/off functions to Kconfig. ARC has already done it and this
should be the same for all platforms.
- Disable caches for noatf dc1/dc2 configurations
- Enable CMD_CACHE
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 3 Sep 2015 06:16:32 +0000 (08:16 +0200)]
ARM: zynqmp: Remove incorrect command
The bug was introduced by:
"zynqmp: usb: Add usb dwc3 driver support for zynqmp"
(sha1: 2d5bc2183fa6484e8411ffa8edf1a33c63cb54b6)
with incorrect conflict resolution.
Remove this additional line.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>