Merge branch 'for-next/misc'
This commit is contained in:
commit
e147a7e2bb
6
Makefile
6
Makefile
|
@ -577,7 +577,7 @@ define rule_barebox__
|
|||
$(cmd_sysmap) $@ System.map; \
|
||||
if [ $$? -ne 0 ]; then \
|
||||
rm -f $@; \
|
||||
/bin/false; \
|
||||
false; \
|
||||
fi;
|
||||
endef
|
||||
|
||||
|
@ -614,7 +614,7 @@ define verify_kallsyms
|
|||
$(Q)cmp -s System.map .tmp_System.map || \
|
||||
(echo Inconsistent kallsyms data; \
|
||||
echo Try setting CONFIG_KALLSYMS_EXTRA_PASS; \
|
||||
rm .tmp_kallsyms* ; /bin/false )
|
||||
rm .tmp_kallsyms* ; false )
|
||||
endef
|
||||
|
||||
# Update barebox version before link
|
||||
|
@ -782,7 +782,7 @@ ifneq ($(KBUILD_SRC),)
|
|||
$(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \
|
||||
echo " $(srctree) is not clean, please run 'make mrproper'";\
|
||||
echo " in the '$(srctree)' directory.";\
|
||||
/bin/false; \
|
||||
false; \
|
||||
fi;
|
||||
$(Q)if [ ! -d include2 ]; then mkdir -p include2; fi;
|
||||
$(Q)if [ -e $(srctree)/include/asm-$(SRCARCH)/barebox.h ]; then \
|
||||
|
|
|
@ -58,23 +58,15 @@ static iomux_v3_cfg_t realq7_pads_gpio[] = {
|
|||
MX6Q_PAD_RGMII_RX_CTL__GPIO_6_24,
|
||||
};
|
||||
|
||||
static void mmd_write_reg(struct phy_device *dev, int device, int reg, int val)
|
||||
{
|
||||
phy_write(dev, 0x0d, device);
|
||||
phy_write(dev, 0x0e, reg);
|
||||
phy_write(dev, 0x0d, (1 << 14) | device);
|
||||
phy_write(dev, 0x0e, val);
|
||||
}
|
||||
|
||||
static int ksz9031rn_phy_fixup(struct phy_device *dev)
|
||||
{
|
||||
/*
|
||||
* min rx data delay, max rx/tx clock delay,
|
||||
* min rx/tx control delay
|
||||
*/
|
||||
mmd_write_reg(dev, 2, 4, 0);
|
||||
mmd_write_reg(dev, 2, 5, 0);
|
||||
mmd_write_reg(dev, 2, 8, 0x003ff);
|
||||
phy_write_mmd_indirect(dev, 4, 2, 0);
|
||||
phy_write_mmd_indirect(dev, 5, 2, 0);
|
||||
phy_write_mmd_indirect(dev, 8, 2, 0x03ff);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -58,23 +58,15 @@ static iomux_v3_cfg_t tqma6x_pads_gpio[] = {
|
|||
MX6Q_PAD_RGMII_RX_CTL__GPIO_6_24,
|
||||
};
|
||||
|
||||
static void mmd_write_reg(struct phy_device *dev, int device, int reg, int val)
|
||||
{
|
||||
phy_write(dev, 0x0d, device);
|
||||
phy_write(dev, 0x0e, reg);
|
||||
phy_write(dev, 0x0d, (1 << 14) | device);
|
||||
phy_write(dev, 0x0e, val);
|
||||
}
|
||||
|
||||
static int ksz9031rn_phy_fixup(struct phy_device *dev)
|
||||
{
|
||||
/*
|
||||
* min rx data delay, max rx/tx clock delay,
|
||||
* min rx/tx control delay
|
||||
*/
|
||||
mmd_write_reg(dev, 2, 4, 0);
|
||||
mmd_write_reg(dev, 2, 5, 0);
|
||||
mmd_write_reg(dev, 2, 8, 0x003ff);
|
||||
phy_write_mmd_indirect(dev, 4, 2, 0);
|
||||
phy_write_mmd_indirect(dev, 5, 2, 0);
|
||||
phy_write_mmd_indirect(dev, 8, 2, 0x003ff);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -80,6 +80,19 @@ static char *bootm_image_name_and_no(const char *name, int *no)
|
|||
#define BOOTM_OPTS BOOTM_OPTS_COMMON
|
||||
#endif
|
||||
|
||||
unsigned long long getenv_loadaddr(const char *name)
|
||||
{
|
||||
const char *valstr = getenv(name);
|
||||
|
||||
if (!valstr)
|
||||
return UIMAGE_SOME_ADDRESS;
|
||||
|
||||
if (valstr[0] == '\0')
|
||||
return UIMAGE_SOME_ADDRESS;
|
||||
|
||||
return simple_strtoull(valstr, NULL, 0);
|
||||
}
|
||||
|
||||
static int do_bootm(int argc, char *argv[])
|
||||
{
|
||||
int opt;
|
||||
|
@ -96,6 +109,8 @@ static int do_bootm(int argc, char *argv[])
|
|||
|
||||
oftree = getenv("global.bootm.oftree");
|
||||
os_file = getenv("global.bootm.image");
|
||||
data.os_address = getenv_loadaddr("global.bootm.image.loadaddr");
|
||||
data.initrd_address = getenv_loadaddr("global.bootm.initrd.loadaddr");
|
||||
if (IS_ENABLED(CONFIG_CMD_BOOTM_INITRD))
|
||||
initrd_file = getenv("global.bootm.initrd");
|
||||
|
||||
|
@ -165,9 +180,12 @@ static int bootm_init(void)
|
|||
{
|
||||
|
||||
globalvar_add_simple("bootm.image");
|
||||
globalvar_add_simple("bootm.image.loadaddr");
|
||||
globalvar_add_simple("bootm.oftree");
|
||||
if (IS_ENABLED(CONFIG_CMD_BOOTM_INITRD))
|
||||
if (IS_ENABLED(CONFIG_CMD_BOOTM_INITRD)) {
|
||||
globalvar_add_simple("bootm.initrd");
|
||||
globalvar_add_simple("bootm.initrd.loadaddr");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -199,7 +217,9 @@ BAREBOX_CMD_END
|
|||
|
||||
BAREBOX_MAGICVAR(bootargs, "Linux Kernel parameters");
|
||||
BAREBOX_MAGICVAR_NAMED(global_bootm_image, global.bootm.image, "bootm default boot image");
|
||||
BAREBOX_MAGICVAR_NAMED(global_bootm_image_loadaddr, global.bootm.image.loadaddr, "bootm default boot image loadaddr");
|
||||
BAREBOX_MAGICVAR_NAMED(global_bootm_initrd, global.bootm.initrd, "bootm default initrd");
|
||||
BAREBOX_MAGICVAR_NAMED(global_bootm_initrd_loadaddr, global.bootm.initrd.loadaddr, "bootm default initrd loadaddr");
|
||||
|
||||
static struct binfmt_hook binfmt_uimage_hook = {
|
||||
.type = filetype_uimage,
|
||||
|
|
|
@ -65,7 +65,7 @@ static int syscon_probe(struct device_d *dev)
|
|||
syscon->base = (void __iomem *)res->start;
|
||||
dev->priv = syscon;
|
||||
|
||||
dev_info(dev, "map 0x%x-0x%x registered\n", res->start, res->end);
|
||||
dev_dbg(dev, "map 0x%x-0x%x registered\n", res->start, res->end);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -632,6 +632,69 @@ int genphy_read_status(struct phy_device *phydev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline void mmd_phy_indirect(struct phy_device *phydev, int prtad,
|
||||
int devad)
|
||||
{
|
||||
/* Write the desired MMD Devad */
|
||||
phy_write(phydev, MII_MMD_CTRL, devad);
|
||||
|
||||
/* Write the desired MMD register address */
|
||||
phy_write(phydev, MII_MMD_DATA, prtad);
|
||||
|
||||
/* Select the Function : DATA with no post increment */
|
||||
phy_write(phydev, MII_MMD_CTRL, (devad | MII_MMD_CTRL_NOINCR));
|
||||
}
|
||||
|
||||
/**
|
||||
* phy_read_mmd_indirect - reads data from the MMD registers
|
||||
* @phy_device: phy device
|
||||
* @prtad: MMD Address
|
||||
* @devad: MMD DEVAD
|
||||
*
|
||||
* Description: it reads data from the MMD registers (clause 22 to access to
|
||||
* clause 45) of the specified phy address.
|
||||
* To read these register we have:
|
||||
* 1) Write reg 13 // DEVAD
|
||||
* 2) Write reg 14 // MMD Address
|
||||
* 3) Write reg 13 // MMD Data Command for MMD DEVAD
|
||||
* 3) Read reg 14 // Read MMD data
|
||||
*/
|
||||
int phy_read_mmd_indirect(struct phy_device *phydev, int prtad, int devad)
|
||||
{
|
||||
u32 ret;
|
||||
|
||||
mmd_phy_indirect(phydev, prtad, devad);
|
||||
|
||||
/* Read the content of the MMD's selected register */
|
||||
ret = phy_read(phydev, MII_MMD_DATA);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* phy_write_mmd_indirect - writes data to the MMD registers
|
||||
* @phy_device: phy device
|
||||
* @prtad: MMD Address
|
||||
* @devad: MMD DEVAD
|
||||
* @data: data to write in the MMD register
|
||||
*
|
||||
* Description: Write data from the MMD registers of the specified
|
||||
* phy address.
|
||||
* To write these register we have:
|
||||
* 1) Write reg 13 // DEVAD
|
||||
* 2) Write reg 14 // MMD Address
|
||||
* 3) Write reg 13 // MMD Data Command for MMD DEVAD
|
||||
* 3) Write reg 14 // Write MMD data
|
||||
*/
|
||||
void phy_write_mmd_indirect(struct phy_device *phydev, int prtad, int devad,
|
||||
u16 data)
|
||||
{
|
||||
mmd_phy_indirect(phydev, prtad, devad);
|
||||
|
||||
/* Write the data into MMD's selected register */
|
||||
phy_write(phydev, MII_MMD_DATA, data);
|
||||
}
|
||||
|
||||
static int genphy_config_init(struct phy_device *phydev)
|
||||
{
|
||||
int val;
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#define TFTP_RESEND_TIMEOUT SECOND
|
||||
|
||||
/* After this time without progress we will bail out */
|
||||
#define TFTP_TIMEOUT (5 * SECOND)
|
||||
#define TFTP_TIMEOUT (TIMEOUT * SECOND)
|
||||
|
||||
/*
|
||||
* TFTP operations.
|
||||
|
|
|
@ -288,5 +288,9 @@ int phy_register_fixup_for_uid(u32 phy_uid, u32 phy_uid_mask,
|
|||
int (*run)(struct phy_device *));
|
||||
int phy_scan_fixups(struct phy_device *phydev);
|
||||
|
||||
int phy_read_mmd_indirect(struct phy_device *phydev, int prtad, int devad);
|
||||
void phy_write_mmd_indirect(struct phy_device *phydev, int prtad, int devad,
|
||||
u16 data);
|
||||
|
||||
extern struct bus_type mdio_bus_type;
|
||||
#endif /* __PHYDEV_H__ */
|
||||
|
|
|
@ -41,7 +41,7 @@ static unsigned int net_ip_id;
|
|||
|
||||
int net_checksum_ok(unsigned char *ptr, int len)
|
||||
{
|
||||
return net_checksum(ptr, len) + 1;
|
||||
return net_checksum(ptr, len) == 0xffff;
|
||||
}
|
||||
|
||||
uint16_t net_checksum(unsigned char *ptr, int len)
|
||||
|
|
|
@ -24,7 +24,7 @@ for i in $*; do
|
|||
done
|
||||
)
|
||||
|
||||
find $tempdir -name '.svn' -o -name '*~' | xargs --no-run-if-empty rm -r
|
||||
find $tempdir -name '.svn' -o -name '*~' -delete
|
||||
|
||||
$objtree/scripts/bareboxenv -s $tempdir $target
|
||||
|
||||
|
|
Loading…
Reference in New Issue