This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/DP83848I: Not able to compile PHY driver for DP83848

Part Number: DP83848I

Tool/software: Linux

Hi All,

I am trying to compile and iclude the driver for the DP83848 PHY device in our linux kernel. I downloaded the driver source code (dp83848.c) file from TI site and followed all the instructions on how to include this driver in the kernel while building the image. While compiling I keep getting the errors mentioned below. The linux kernel version I am using is 2.6.17.6 and I am trying to build this for our target PowerPC board.

 

Compiler Output:

In file included from drivers/net/phy/dp83848.c:17:
include/linux/phy.h:375: warning: 'struct ethtool_cmd' declared inside parameter list
include/linux/phy.h:375: warning: its scope is only this definition or declaration, which is probably not what you want
include/linux/phy.h:376: warning: 'struct ethtool_cmd' declared inside parameter list
include/linux/phy.h:378: warning: 'struct mii_ioctl_data' declared inside parameter list
drivers/net/phy/dp83848.c: In function 'dp83848_config_intr':
drivers/net/phy/dp83848.c:61: warning: implicit declaration of function 'BIT'
drivers/net/phy/dp83848.c: At top level:
drivers/net/phy/dp83848.c:74: error: parse error before 'dp83848_tbl'
drivers/net/phy/dp83848.c:74: warning: type defaults to 'int' in declaration of 'dp83848_tbl'
drivers/net/phy/dp83848.c:75: warning: braces around scalar initializer
drivers/net/phy/dp83848.c:75: warning: (near initialization for 'dp83848_tbl[0]')
drivers/net/phy/dp83848.c:75: warning: excess elements in scalar initializer
drivers/net/phy/dp83848.c:75: warning: (near initialization for 'dp83848_tbl[0]')
drivers/net/phy/dp83848.c:76: warning: braces around scalar initializer
drivers/net/phy/dp83848.c:76: warning: (near initialization for 'dp83848_tbl[1]')
drivers/net/phy/dp83848.c:76: warning: excess elements in scalar initializer
drivers/net/phy/dp83848.c:76: warning: (near initialization for 'dp83848_tbl[1]')
drivers/net/phy/dp83848.c:77: warning: braces around scalar initializer
drivers/net/phy/dp83848.c:77: warning: (near initialization for 'dp83848_tbl[2]')
drivers/net/phy/dp83848.c:77: warning: excess elements in scalar initializer
drivers/net/phy/dp83848.c:77: warning: (near initialization for 'dp83848_tbl[2]')
drivers/net/phy/dp83848.c:78: warning: braces around scalar initializer
drivers/net/phy/dp83848.c:78: warning: (near initialization for 'dp83848_tbl[3]')
drivers/net/phy/dp83848.c:78: warning: excess elements in scalar initializer
drivers/net/phy/dp83848.c:78: warning: (near initialization for 'dp83848_tbl[3]')
drivers/net/phy/dp83848.c:79: warning: braces around scalar initializer
drivers/net/phy/dp83848.c:79: warning: (near initialization for 'dp83848_tbl[4]')
drivers/net/phy/dp83848.c:79: warning: excess elements in scalar initializer
drivers/net/phy/dp83848.c:79: warning: (near initialization for 'dp83848_tbl[4]')
drivers/net/phy/dp83848.c:81: warning: data definition has no type or storage class
drivers/net/phy/dp83848.c:85: error: parse error before '{' token
drivers/net/phy/dp83848.c:105: error: parse error before ',' token
drivers/net/phy/dp83848.c:111: warning: type defaults to 'int' in declaration of 'module_phy_driver'
drivers/net/phy/dp83848.c:111: warning: parameter names (without types) in function declaration
drivers/net/phy/dp83848.c:111: warning: data definition has no type or storage class

I am a newcomer to adding new driver support. Can somebody help me fix these errors?

Thanks,

Sachin