Changeset aedc9849 in rtems


Ignore:
Timestamp:
Feb 5, 2015, 7:05:56 AM (4 years ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
4.11, master
Children:
5ba4906
Parents:
bf6fe958
git-author:
Daniel Hellstrom <daniel@…> (02/05/15 07:05:56)
git-committer:
Daniel Hellstrom <daniel@…> (04/16/15 23:10:21)
Message:

GRETH: fix build warnings with GCC-4.9

Location:
c/src/lib/libbsp/sparc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/leon3/include/bsp.h

    rbf6fe958 raedc9849  
    102102/* Configure GRETH driver */
    103103#define GRETH_SUPPORTED
    104 #define GRETH_MEM_LOAD(addr) leon_r32_no_cache(addr)
     104#define GRETH_MEM_LOAD(addr) leon_r32_no_cache((uintptr_t)addr)
    105105
    106106extern int   CPU_SPARC_HAS_SNOOPING;
  • c/src/lib/libbsp/sparc/shared/net/greth.c

    rbf6fe958 raedc9849  
    118118const struct timespec greth_tan = {
    119119   GRETH_AUTONEGO_TIMEOUT_MS/1000,
    120    GRETH_AUTONEGO_TIMEOUT_MS*1000000
     120   (GRETH_AUTONEGO_TIMEOUT_MS % 1000) * 1000000
    121121};
    122122
     
    214214/* GRETH interrupt handler */
    215215
    216 void greth_interrupt (void *arg)
     216static void greth_interrupt (void *arg)
    217217{
    218218        uint32_t status;
     
    257257    while (sc->regs->mdio_ctrl & GRETH_MDIO_BUSY) {}
    258258    if (!(sc->regs->mdio_ctrl & GRETH_MDIO_LINKFAIL)) {
    259         MIIDBG("greth%d: mii read[%d] OK to %x.%x (0x%08x,0x%08x)\n",
    260                 sc->minor, sc->phy_read_access, phy_addr, reg_addr,
    261                 sc->regs->ctrl, sc->regs->mdio_ctrl);
    262 
     259        MIIDBG("greth%d: mii read[%d] OK to %" PRIx32 ".%" PRIx32
     260               " (0x%08" PRIx32 ",0x%08" PRIx32 ")\n",
     261               sc->minor, sc->phy_read_access, phy_addr, reg_addr,
     262               sc->regs->ctrl, sc->regs->mdio_ctrl);
    263263        return((sc->regs->mdio_ctrl >> 16) & 0xFFFF);
    264264    } else {
    265         printf("greth%d: mii read[%d] failed to %x.%x (0x%08x,0x%08x)\n",
    266                 sc->minor, sc->phy_read_access, phy_addr, reg_addr,
    267                 sc->regs->ctrl, sc->regs->mdio_ctrl);
    268         return (0xffff);
     265        printf("greth%d: mii read[%d] failed to %" PRIx32 ".%" PRIx32
     266               " (0x%08" PRIx32 ",0x%08" PRIx32 ")\n",
     267               sc->minor, sc->phy_read_access, phy_addr, reg_addr,
     268               sc->regs->ctrl, sc->regs->mdio_ctrl);
     269        return (0xffff);
    269270    }
    270271}
     
    278279    while (sc->regs->mdio_ctrl & GRETH_MDIO_BUSY) {}
    279280    if (!(sc->regs->mdio_ctrl & GRETH_MDIO_LINKFAIL)) {
    280         MIIDBG("greth%d: mii write[%d] OK to %x.%x (0x%08x,0x%08x)\n",
    281                 sc->minor, sc->phy_write_access, phy_addr, reg_addr,
    282                 sc->regs->ctrl, sc->regs->mdio_ctrl);
     281        MIIDBG("greth%d: mii write[%d] OK to  to %" PRIx32 ".%" PRIx32
     282               "(0x%08" PRIx32 ",0x%08" PRIx32 ")\n",
     283               sc->minor, sc->phy_write_access, phy_addr, reg_addr,
     284               sc->regs->ctrl, sc->regs->mdio_ctrl);
    283285    } else {
    284         printf("greth%d: mii write[%d] failed to %x.%x (0x%08x,0x%08x)\n",
    285                 sc->minor, sc->phy_write_access, phy_addr, reg_addr,
    286                 sc->regs->ctrl, sc->regs->mdio_ctrl);
     286        printf("greth%d: mii write[%d] failed to to %" PRIx32 ".%" PRIx32
     287               " (0x%08" PRIx32 ",0x%08" PRIx32 ")\n",
     288               sc->minor, sc->phy_write_access, phy_addr, reg_addr,
     289               sc->regs->ctrl, sc->regs->mdio_ctrl);
    287290    }
    288291}
     
    311314#ifdef GRETH_AUTONEGO_PRINT_TIME
    312315    if ( sc->auto_neg ) {
    313         printf("Autonegotiation Time: %dms\n", sc->auto_neg_time.tv_sec * 1000 +
     316        printf("Autonegotiation Time: %ldms\n", sc->auto_neg_time.tv_sec * 1000 +
    314317               sc->auto_neg_time.tv_nsec / 1000000);
    315318    }
     
    622625#endif
    623626
    624 void
     627static void
    625628greth_Daemon (void *arg)
    626629{
     
    842845
    843846
    844 int
     847static int
    845848sendpacket_gbit (struct ifnet *ifp, struct mbuf *m)
    846849{
     
    12371240 * Attach an GRETH driver to the system
    12381241 */
    1239 int
     1242static int
    12401243greth_interface_driver_attach (
    12411244    struct rtems_bsdnet_ifconfig *config,
Note: See TracChangeset for help on using the changeset viewer.