aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi_mpc8xxx.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-05-25 02:38:26 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-05-25 02:38:26 -0400
commitb1e50ebcf24668e57f058deb48b0704b5391ed0f (patch)
tree17e1b69b249d0738317b732186340c9dd053f1a1 /drivers/spi/spi_mpc8xxx.c
parent0c2a2ae32793e3500a15a449612485f5d17dd431 (diff)
parent7e125f7b9cbfce4101191b8076d606c517a73066 (diff)
Merge remote branch 'origin' into secretlab/next-spi
Diffstat (limited to 'drivers/spi/spi_mpc8xxx.c')
-rw-r--r--drivers/spi/spi_mpc8xxx.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/spi/spi_mpc8xxx.c b/drivers/spi/spi_mpc8xxx.c
index 6e7aabe8db18..ffa111a7e9d4 100644
--- a/drivers/spi/spi_mpc8xxx.c
+++ b/drivers/spi/spi_mpc8xxx.c
@@ -678,7 +678,7 @@ static int mpc8xxx_spi_setup(struct spi_device *spi)
678 } 678 }
679 mpc8xxx_spi = spi_master_get_devdata(spi->master); 679 mpc8xxx_spi = spi_master_get_devdata(spi->master);
680 680
681 hw_mode = cs->hw_mode; /* Save orginal settings */ 681 hw_mode = cs->hw_mode; /* Save original settings */
682 cs->hw_mode = mpc8xxx_spi_read_reg(&mpc8xxx_spi->base->mode); 682 cs->hw_mode = mpc8xxx_spi_read_reg(&mpc8xxx_spi->base->mode);
683 /* mask out bits we are going to set */ 683 /* mask out bits we are going to set */
684 cs->hw_mode &= ~(SPMODE_CP_BEGIN_EDGECLK | SPMODE_CI_INACTIVEHIGH 684 cs->hw_mode &= ~(SPMODE_CP_BEGIN_EDGECLK | SPMODE_CI_INACTIVEHIGH
@@ -835,7 +835,7 @@ static void mpc8xxx_spi_free_dummy_rx(void)
835static unsigned long mpc8xxx_spi_cpm_get_pram(struct mpc8xxx_spi *mspi) 835static unsigned long mpc8xxx_spi_cpm_get_pram(struct mpc8xxx_spi *mspi)
836{ 836{
837 struct device *dev = mspi->dev; 837 struct device *dev = mspi->dev;
838 struct device_node *np = dev_archdata_get_node(&dev->archdata); 838 struct device_node *np = dev->of_node;
839 const u32 *iprop; 839 const u32 *iprop;
840 int size; 840 int size;
841 unsigned long spi_base_ofs; 841 unsigned long spi_base_ofs;
@@ -889,7 +889,7 @@ static unsigned long mpc8xxx_spi_cpm_get_pram(struct mpc8xxx_spi *mspi)
889static int mpc8xxx_spi_cpm_init(struct mpc8xxx_spi *mspi) 889static int mpc8xxx_spi_cpm_init(struct mpc8xxx_spi *mspi)
890{ 890{
891 struct device *dev = mspi->dev; 891 struct device *dev = mspi->dev;
892 struct device_node *np = dev_archdata_get_node(&dev->archdata); 892 struct device_node *np = dev->of_node;
893 const u32 *iprop; 893 const u32 *iprop;
894 int size; 894 int size;
895 unsigned long pram_ofs; 895 unsigned long pram_ofs;
@@ -1161,7 +1161,7 @@ static void mpc8xxx_spi_cs_control(struct spi_device *spi, bool on)
1161 1161
1162static int of_mpc8xxx_spi_get_chipselects(struct device *dev) 1162static int of_mpc8xxx_spi_get_chipselects(struct device *dev)
1163{ 1163{
1164 struct device_node *np = dev_archdata_get_node(&dev->archdata); 1164 struct device_node *np = dev->of_node;
1165 struct fsl_spi_platform_data *pdata = dev->platform_data; 1165 struct fsl_spi_platform_data *pdata = dev->platform_data;
1166 struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(pdata); 1166 struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(pdata);
1167 unsigned int ngpios; 1167 unsigned int ngpios;
@@ -1262,7 +1262,7 @@ static int __devinit of_mpc8xxx_spi_probe(struct of_device *ofdev,
1262 const struct of_device_id *ofid) 1262 const struct of_device_id *ofid)
1263{ 1263{
1264 struct device *dev = &ofdev->dev; 1264 struct device *dev = &ofdev->dev;
1265 struct device_node *np = ofdev->node; 1265 struct device_node *np = ofdev->dev.of_node;
1266 struct mpc8xxx_spi_probe_info *pinfo; 1266 struct mpc8xxx_spi_probe_info *pinfo;
1267 struct fsl_spi_platform_data *pdata; 1267 struct fsl_spi_platform_data *pdata;
1268 struct spi_master *master; 1268 struct spi_master *master;
@@ -1350,8 +1350,11 @@ static const struct of_device_id of_mpc8xxx_spi_match[] = {
1350MODULE_DEVICE_TABLE(of, of_mpc8xxx_spi_match); 1350MODULE_DEVICE_TABLE(of, of_mpc8xxx_spi_match);
1351 1351
1352static struct of_platform_driver of_mpc8xxx_spi_driver = { 1352static struct of_platform_driver of_mpc8xxx_spi_driver = {
1353 .name = "mpc8xxx_spi", 1353 .driver = {
1354 .match_table = of_mpc8xxx_spi_match, 1354 .name = "mpc8xxx_spi",
1355 .owner = THIS_MODULE,
1356 .of_match_table = of_mpc8xxx_spi_match,
1357 },
1355 .probe = of_mpc8xxx_spi_probe, 1358 .probe = of_mpc8xxx_spi_probe,
1356 .remove = __devexit_p(of_mpc8xxx_spi_remove), 1359 .remove = __devexit_p(of_mpc8xxx_spi_remove),
1357}; 1360};