diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/misc/Makefile | 1 | ||||
-rw-r--r-- | drivers/misc/fsl_debug_server.c | 10 | ||||
-rw-r--r-- | drivers/misc/fsl_devdis.c | 29 | ||||
-rw-r--r-- | drivers/net/phy/vitesse.c | 11 | ||||
-rw-r--r-- | drivers/net/tsec.c | 6 | ||||
-rw-r--r-- | drivers/pci/pcie_layerscape.c | 9 | ||||
-rw-r--r-- | drivers/rtc/ds3231.c | 10 |
7 files changed, 65 insertions, 11 deletions
diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index 5218b91c0b..8d0fc3c5cb 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -35,3 +35,4 @@ obj-$(CONFIG_FSL_IFC) += fsl_ifc.o obj-$(CONFIG_FSL_SEC_MON) += fsl_sec_mon.o obj-$(CONFIG_PCA9551_LED) += pca9551_led.o obj-$(CONFIG_RESET) += reset-uclass.o +obj-$(CONFIG_FSL_DEVICE_DISABLE) += fsl_devdis.o diff --git a/drivers/misc/fsl_debug_server.c b/drivers/misc/fsl_debug_server.c index 44cd9b9fd4..a592891f26 100644 --- a/drivers/misc/fsl_debug_server.c +++ b/drivers/misc/fsl_debug_server.c @@ -60,29 +60,29 @@ int debug_server_parse_firmware_fit_image(const void **raw_image_addr, /* Check if Image is in FIT format */ format = genimg_get_format(fit_hdr); if (format != IMAGE_FORMAT_FIT) { - printf("Error! Not a FIT image\n"); + printf("Debug Server FW: Not a FIT image\n"); goto out_error; } if (!fit_check_format(fit_hdr)) { - printf("Error! Bad FIT image format\n"); + printf("Debug Server FW: Bad FIT image format\n"); goto out_error; } node_offset = fit_image_get_node(fit_hdr, uname); if (node_offset < 0) { - printf("Error! Can not find %s subimage\n", uname); + printf("Debug Server FW:Can not find %s subimage\n", uname); goto out_error; } /* Verify Debug Server firmware image */ if (!fit_image_verify(fit_hdr, node_offset)) { - printf("Error! Bad Debug Server firmware hash"); + printf("Debug Server FW: Bad Debug Server firmware hash"); goto out_error; } if (fit_get_desc(fit_hdr, node_offset, &desc) < 0) { - printf("Error! Failed to get Debug Server fw description"); + printf("Debug Server FW: Failed to get FW description"); goto out_error; } diff --git a/drivers/misc/fsl_devdis.c b/drivers/misc/fsl_devdis.c new file mode 100644 index 0000000000..996f45c281 --- /dev/null +++ b/drivers/misc/fsl_devdis.c @@ -0,0 +1,29 @@ +/* + * Copyright 2015 Freescale Semiconductor, Inc. + * Author: Zhuoyu Zhang <Zhuoyu.Zhang@freescale.com> + * + * SPDX-License-Identifier: GPL-2.0+ + */ +#include <common.h> +#include <asm/io.h> +#include <asm/arch-ls102xa/immap_ls102xa.h> +#include <asm/arch-ls102xa/config.h> +#include <linux/compiler.h> +#include <hwconfig.h> +#include <fsl_devdis.h> + +void device_disable(const struct devdis_table *tbl, uint32_t num) +{ + int i; + struct ccsr_gur __iomem *gur = (void *)CONFIG_SYS_FSL_GUTS_ADDR; + + /* + * Extract hwconfig from environment and disable unused device. + */ + for (i = 0; i < num; i++) { + if (hwconfig_sub("devdis", tbl[i].name)) + setbits_be32(&gur->devdisr + tbl[i].offset, + tbl[i].mask); + } +} + diff --git a/drivers/net/phy/vitesse.c b/drivers/net/phy/vitesse.c index 20a67466a7..941d0760b5 100644 --- a/drivers/net/phy/vitesse.c +++ b/drivers/net/phy/vitesse.c @@ -347,6 +347,16 @@ static struct phy_driver VSC8514_driver = { .shutdown = &genphy_shutdown, }; +static struct phy_driver VSC8584_driver = { + .name = "Vitesse VSC8584", + .uid = 0x707c0, + .mask = 0xffff0, + .features = PHY_GBIT_FEATURES, + .config = &vsc8574_config, + .startup = &vitesse_startup, + .shutdown = &genphy_shutdown, +}; + static struct phy_driver VSC8601_driver = { .name = "Vitesse VSC8601", .uid = 0x70420, @@ -417,6 +427,7 @@ int phy_vitesse_init(void) phy_register(&VSC8211_driver); phy_register(&VSC8221_driver); phy_register(&VSC8574_driver); + phy_register(&VSC8584_driver); phy_register(&VSC8514_driver); phy_register(&VSC8662_driver); phy_register(&VSC8664_driver); diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c index 42d037471f..4bdc188c8f 100644 --- a/drivers/net/tsec.c +++ b/drivers/net/tsec.c @@ -271,9 +271,6 @@ void redundant_init(struct eth_device *dev) out_be32(®s->tstat, TSTAT_CLEAR_THALT); out_be32(®s->rstat, RSTAT_CLEAR_RHALT); clrbits_be32(®s->dmactrl, DMACTRL_GRS | DMACTRL_GTS); -#ifdef CONFIG_LS102XA - setbits_be32(®s->dmactrl, DMACTRL_LE); -#endif do { uint16_t status; @@ -370,9 +367,6 @@ static void startup_tsec(struct eth_device *dev) out_be32(®s->tstat, TSTAT_CLEAR_THALT); out_be32(®s->rstat, RSTAT_CLEAR_RHALT); clrbits_be32(®s->dmactrl, DMACTRL_GRS | DMACTRL_GTS); -#ifdef CONFIG_LS102XA - setbits_be32(®s->dmactrl, DMACTRL_LE); -#endif } /* This returns the status bits of the device. The return value diff --git a/drivers/pci/pcie_layerscape.c b/drivers/pci/pcie_layerscape.c index 95cfe8c16f..2f24a6a39b 100644 --- a/drivers/pci/pcie_layerscape.c +++ b/drivers/pci/pcie_layerscape.c @@ -689,6 +689,7 @@ void fdt_fixup_smmu_pcie(void *blob) { int count; u32 stream_ids[MAX_STREAM_IDS]; + u32 ctlr_streamid = 0x300; #ifdef CONFIG_PCIE1 /* PEX1 stream ID fixup */ @@ -696,6 +697,8 @@ void fdt_fixup_smmu_pcie(void *blob) alloc_stream_ids(FSL_PEX1_STREAM_ID_START, count, stream_ids, MAX_STREAM_IDS); pcie_set_available_streamids(blob, "/pcie@3400000", stream_ids, count); + append_mmu_masters(blob, "/iommu@5000000", "/pcie@3400000", + &ctlr_streamid, 1); #endif #ifdef CONFIG_PCIE2 @@ -704,6 +707,8 @@ void fdt_fixup_smmu_pcie(void *blob) alloc_stream_ids(FSL_PEX2_STREAM_ID_START, count, stream_ids, MAX_STREAM_IDS); pcie_set_available_streamids(blob, "/pcie@3500000", stream_ids, count); + append_mmu_masters(blob, "/iommu@5000000", "/pcie@3500000", + &ctlr_streamid, 1); #endif #ifdef CONFIG_PCIE3 @@ -712,6 +717,8 @@ void fdt_fixup_smmu_pcie(void *blob) alloc_stream_ids(FSL_PEX3_STREAM_ID_START, count, stream_ids, MAX_STREAM_IDS); pcie_set_available_streamids(blob, "/pcie@3600000", stream_ids, count); + append_mmu_masters(blob, "/iommu@5000000", "/pcie@3600000", + &ctlr_streamid, 1); #endif #ifdef CONFIG_PCIE4 @@ -720,6 +727,8 @@ void fdt_fixup_smmu_pcie(void *blob) alloc_stream_ids(FSL_PEX4_STREAM_ID_START, count, stream_ids, MAX_STREAM_IDS); pcie_set_available_streamids(blob, "/pcie@3700000", stream_ids, count); + append_mmu_masters(blob, "/iommu@5000000", "/pcie@3700000", + &ctlr_streamid, 1); #endif } #endif diff --git a/drivers/rtc/ds3231.c b/drivers/rtc/ds3231.c index c84bbc647f..e5e1be134c 100644 --- a/drivers/rtc/ds3231.c +++ b/drivers/rtc/ds3231.c @@ -49,6 +49,8 @@ #define RTC_STAT_BIT_A1F 0x1 /* Alarm 1 flag */ #define RTC_STAT_BIT_A2F 0x2 /* Alarm 2 flag */ #define RTC_STAT_BIT_OSF 0x80 /* Oscillator stop flag */ +#define RTC_STAT_BIT_BB32KHZ 0x40 /* Battery backed 32KHz Output */ +#define RTC_STAT_BIT_EN32KHZ 0x8 /* Enable 32KHz Output */ static uchar rtc_read (uchar reg); @@ -141,6 +143,14 @@ void rtc_reset (void) rtc_write (RTC_CTL_REG_ADDR, RTC_CTL_BIT_RS1 | RTC_CTL_BIT_RS2); } +/* + * Enable 32KHz output + */ +void rtc_enable_32khz_output(void) +{ + rtc_write(RTC_STAT_REG_ADDR, + RTC_STAT_BIT_BB32KHZ | RTC_STAT_BIT_EN32KHZ); +} /* * Helper functions |