From 3c7dded8e179ee213c8267c892720b84a7a59fd5 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 10 May 2020 11:40:04 -0600 Subject: Fix some checkpatch warnings in calls to debug() Fix up some incorrect code style in calls to functions in the log.h header, mostly debug(). Signed-off-by: Simon Glass --- drivers/rtc/m41t11.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/rtc') diff --git a/drivers/rtc/m41t11.c b/drivers/rtc/m41t11.c index 960348bb3ea..b09d08d65c5 100644 --- a/drivers/rtc/m41t11.c +++ b/drivers/rtc/m41t11.c @@ -109,9 +109,9 @@ int rtc_get (struct rtc_time *tmp) tmp->tm_yday = 0; tmp->tm_isdst= 0; - debug ( "Get DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n", - tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, - tmp->tm_hour, tmp->tm_min, tmp->tm_sec); + debug("Get DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n", + tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, + tmp->tm_hour, tmp->tm_min, tmp->tm_sec); return rel; } @@ -120,9 +120,9 @@ int rtc_set (struct rtc_time *tmp) { uchar data[RTC_REG_CNT]; - debug ( "Set DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n", - tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, - tmp->tm_hour, tmp->tm_min, tmp->tm_sec); + debug("Set DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n", + tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, + tmp->tm_hour, tmp->tm_min, tmp->tm_sec); data[RTC_SEC_ADDR] = bin2bcd(tmp->tm_sec) & 0x7F;/*just in case*/ data[RTC_MIN_ADDR] = bin2bcd(tmp->tm_min); -- cgit v1.2.3 From f7ae49fc4f363a803dab3be078e93ead8e75a8e9 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 10 May 2020 11:40:05 -0600 Subject: common: Drop log.h from common header Move this header out of the common header. Signed-off-by: Simon Glass --- drivers/rtc/davinci.c | 1 + drivers/rtc/ds1307.c | 1 + drivers/rtc/ds1337.c | 1 + drivers/rtc/ds3231.c | 1 + drivers/rtc/ftrtc010.c | 1 + drivers/rtc/i2c_rtc_emul.c | 1 + drivers/rtc/m41t11.c | 1 + drivers/rtc/m41t60.c | 1 + drivers/rtc/m41t62.c | 1 + drivers/rtc/pcf2127.c | 1 + drivers/rtc/pcf8563.c | 1 + drivers/rtc/pl031.c | 1 + drivers/rtc/pt7c4338.c | 1 + drivers/rtc/rtc-uclass.c | 1 + drivers/rtc/rv3029.c | 1 + drivers/rtc/rv8803.c | 1 + drivers/rtc/x1205.c | 1 + 17 files changed, 17 insertions(+) (limited to 'drivers/rtc') diff --git a/drivers/rtc/davinci.c b/drivers/rtc/davinci.c index b6930bd8394..3514e7351ee 100644 --- a/drivers/rtc/davinci.c +++ b/drivers/rtc/davinci.c @@ -5,6 +5,7 @@ */ #include #include +#include #include #include #include diff --git a/drivers/rtc/ds1307.c b/drivers/rtc/ds1307.c index a33f47525f7..17344d4d4ff 100644 --- a/drivers/rtc/ds1307.c +++ b/drivers/rtc/ds1307.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/drivers/rtc/ds1337.c b/drivers/rtc/ds1337.c index af94bcfdf44..4986c96f862 100644 --- a/drivers/rtc/ds1337.c +++ b/drivers/rtc/ds1337.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include diff --git a/drivers/rtc/ds3231.c b/drivers/rtc/ds3231.c index eb5ce73a761..5b72e86768a 100644 --- a/drivers/rtc/ds3231.c +++ b/drivers/rtc/ds3231.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include diff --git a/drivers/rtc/ftrtc010.c b/drivers/rtc/ftrtc010.c index b68ea223f7f..67c2b6e320a 100644 --- a/drivers/rtc/ftrtc010.c +++ b/drivers/rtc/ftrtc010.c @@ -8,6 +8,7 @@ #include #include +#include #include #include diff --git a/drivers/rtc/i2c_rtc_emul.c b/drivers/rtc/i2c_rtc_emul.c index d4b33e59d69..a010af411bb 100644 --- a/drivers/rtc/i2c_rtc_emul.c +++ b/drivers/rtc/i2c_rtc_emul.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/rtc/m41t11.c b/drivers/rtc/m41t11.c index b09d08d65c5..706b7188cf8 100644 --- a/drivers/rtc/m41t11.c +++ b/drivers/rtc/m41t11.c @@ -13,6 +13,7 @@ #include #include +#include #include #include diff --git a/drivers/rtc/m41t60.c b/drivers/rtc/m41t60.c index 532d2105e12..692042b9351 100644 --- a/drivers/rtc/m41t60.c +++ b/drivers/rtc/m41t60.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include diff --git a/drivers/rtc/m41t62.c b/drivers/rtc/m41t62.c index f52e1291a98..94a6b523aab 100644 --- a/drivers/rtc/m41t62.c +++ b/drivers/rtc/m41t62.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include diff --git a/drivers/rtc/pcf2127.c b/drivers/rtc/pcf2127.c index b34ed63bf05..c423960b343 100644 --- a/drivers/rtc/pcf2127.c +++ b/drivers/rtc/pcf2127.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #define PCF2127_REG_CTRL1 0x00 diff --git a/drivers/rtc/pcf8563.c b/drivers/rtc/pcf8563.c index 84f2b231c23..19faefba7c8 100644 --- a/drivers/rtc/pcf8563.c +++ b/drivers/rtc/pcf8563.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include diff --git a/drivers/rtc/pl031.c b/drivers/rtc/pl031.c index 8bf04f26a37..1b6717232c7 100644 --- a/drivers/rtc/pl031.c +++ b/drivers/rtc/pl031.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/rtc/pt7c4338.c b/drivers/rtc/pt7c4338.c index 5211d075868..c987494b669 100644 --- a/drivers/rtc/pt7c4338.c +++ b/drivers/rtc/pt7c4338.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include diff --git a/drivers/rtc/rtc-uclass.c b/drivers/rtc/rtc-uclass.c index a0a238aedda..926cca234e8 100644 --- a/drivers/rtc/rtc-uclass.c +++ b/drivers/rtc/rtc-uclass.c @@ -7,6 +7,7 @@ #include #include #include +#include #include int dm_rtc_get(struct udevice *dev, struct rtc_time *time) diff --git a/drivers/rtc/rv3029.c b/drivers/rtc/rv3029.c index 87c4320d5f4..5e1689a91d9 100644 --- a/drivers/rtc/rv3029.c +++ b/drivers/rtc/rv3029.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include diff --git a/drivers/rtc/rv8803.c b/drivers/rtc/rv8803.c index 2ab40f08336..7f56b155fc3 100644 --- a/drivers/rtc/rv8803.c +++ b/drivers/rtc/rv8803.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include diff --git a/drivers/rtc/x1205.c b/drivers/rtc/x1205.c index ed6aaa52377..ce23427b174 100644 --- a/drivers/rtc/x1205.c +++ b/drivers/rtc/x1205.c @@ -19,6 +19,7 @@ #include #include +#include #include #include -- cgit v1.2.3 From 07e1114671c8b13d1bb90548a3c5ea31c49415d1 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 10 May 2020 11:40:10 -0600 Subject: Fix some checkpatch warnings in calls to udelay() Fix up some incorrect code style in calls to functions in the linux/time.h header, mostly udelay(). Signed-off-by: Simon Glass --- drivers/rtc/ds1306.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'drivers/rtc') diff --git a/drivers/rtc/ds1306.c b/drivers/rtc/ds1306.c index 02d617e09c9..1bd1151e1b3 100644 --- a/drivers/rtc/ds1306.c +++ b/drivers/rtc/ds1306.c @@ -71,7 +71,7 @@ int rtc_get (struct rtc_time *tmp) /* Now we can enable the DS1306 RTC */ immap->im_cpm.cp_pbdat |= PB_SPI_CE; - udelay (10); + udelay(10); /* Shift out the address (0) of the time in the Clock Chip */ soft_spi_send (0); @@ -105,7 +105,7 @@ int rtc_get (struct rtc_time *tmp) /* Now we can disable the DS1306 RTC */ immap->im_cpm.cp_pbdat &= ~PB_SPI_CE; /* Disable DS1306 Chip */ - udelay (10); + udelay(10); rtc_calc_weekday(tmp); /* Determine the day of week */ @@ -127,7 +127,7 @@ int rtc_set (struct rtc_time *tmp) /* Now we can enable the DS1306 RTC */ immap->im_cpm.cp_pbdat |= PB_SPI_CE; /* Enable DS1306 Chip */ - udelay (10); + udelay(10); /* First disable write protect in the clock chip control register */ soft_spi_send (0x8F); /* send address of the control register */ @@ -135,11 +135,11 @@ int rtc_set (struct rtc_time *tmp) /* Now disable the DS1306 to terminate the write */ immap->im_cpm.cp_pbdat &= ~PB_SPI_CE; - udelay (10); + udelay(10); /* Now enable the DS1306 to initiate a new write */ immap->im_cpm.cp_pbdat |= PB_SPI_CE; - udelay (10); + udelay(10); /* Next, send the address of the clock time write registers */ soft_spi_send (0x80); /* send address of the first time register */ @@ -156,11 +156,11 @@ int rtc_set (struct rtc_time *tmp) /* Now we can disable the Clock chip to terminate the burst write */ immap->im_cpm.cp_pbdat &= ~PB_SPI_CE; /* Disable DS1306 Chip */ - udelay (10); + udelay(10); /* Now we can enable the Clock chip to initiate a new write */ immap->im_cpm.cp_pbdat |= PB_SPI_CE; /* Enable DS1306 Chip */ - udelay (10); + udelay(10); /* First we Enable write protect in the clock chip control register */ soft_spi_send (0x8F); /* send address of the control register */ @@ -168,7 +168,7 @@ int rtc_set (struct rtc_time *tmp) /* Now disable the DS1306 */ immap->im_cpm.cp_pbdat &= ~PB_SPI_CE; /* Disable DS1306 Chip */ - udelay (10); + udelay(10); /* Set standard MPC8xx clock to the same time so Linux will * see the time even if it doesn't have a DS1306 clock driver. @@ -204,7 +204,7 @@ static void init_spi (void) immap->im_cpm.cp_pbdir |= (PB_SPIMOSI | PB_SPI_CE | PB_SPISCK); immap->im_cpm.cp_pbdir &= ~PB_SPIMISO; /* Make MISO pin an input */ - udelay (10); + udelay(10); } /* ------------------------------------------------------------------------- */ @@ -227,10 +227,10 @@ static void soft_spi_send (unsigned char n) immap->im_cpm.cp_pbdat |= PB_SPIMOSI; /* Set MOSI to 1 */ else immap->im_cpm.cp_pbdat &= ~PB_SPIMOSI; /* Set MOSI to 0 */ - udelay (10); + udelay(10); immap->im_cpm.cp_pbdat &= ~PB_SPISCK; /* Lower SCK */ - udelay (10); + udelay(10); bitpos >>= 1; /* Shift for next bit position */ } @@ -253,11 +253,11 @@ static unsigned char soft_spi_read (void) /* Read 8 bits here */ for (i = 0; i < 8; i++) { /* Do 8 bits in loop */ immap->im_cpm.cp_pbdat |= PB_SPISCK; /* Raise SCK */ - udelay (10); + udelay(10); if (immap->im_cpm.cp_pbdat & PB_SPIMISO) /* Get a bit of data */ spi_byte |= bitpos; /* Set data accordingly */ immap->im_cpm.cp_pbdat &= ~PB_SPISCK; /* Lower SCK */ - udelay (10); + udelay(10); bitpos >>= 1; /* Shift for next bit position */ } -- cgit v1.2.3 From c05ed00afb95fa5237f16962fccf5810437317bf Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 10 May 2020 11:40:11 -0600 Subject: common: Drop linux/delay.h from common header Move this uncommon header out of the common header. Signed-off-by: Simon Glass --- drivers/rtc/davinci.c | 1 + drivers/rtc/ds1302.c | 1 + drivers/rtc/ds1306.c | 1 + drivers/rtc/imxdi.c | 1 + drivers/rtc/max6900.c | 1 + drivers/rtc/mvrtc.c | 1 + drivers/rtc/rv3029.c | 1 + drivers/rtc/s35392a.c | 1 + 8 files changed, 8 insertions(+) (limited to 'drivers/rtc') diff --git a/drivers/rtc/davinci.c b/drivers/rtc/davinci.c index 3514e7351ee..c446e7a735f 100644 --- a/drivers/rtc/davinci.c +++ b/drivers/rtc/davinci.c @@ -9,6 +9,7 @@ #include #include #include +#include int rtc_get(struct rtc_time *tmp) { diff --git a/drivers/rtc/ds1302.c b/drivers/rtc/ds1302.c index b94163f7486..189607c3e02 100644 --- a/drivers/rtc/ds1302.c +++ b/drivers/rtc/ds1302.c @@ -8,6 +8,7 @@ #include #include #include +#include /* GPP Pins */ #define DATA 0x200 diff --git a/drivers/rtc/ds1306.c b/drivers/rtc/ds1306.c index 1bd1151e1b3..36d615812b2 100644 --- a/drivers/rtc/ds1306.c +++ b/drivers/rtc/ds1306.c @@ -18,6 +18,7 @@ #include #include #include +#include #define RTC_SECONDS 0x00 #define RTC_MINUTES 0x01 diff --git a/drivers/rtc/imxdi.c b/drivers/rtc/imxdi.c index 39920f1a7a9..e3a1393266c 100644 --- a/drivers/rtc/imxdi.c +++ b/drivers/rtc/imxdi.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/drivers/rtc/max6900.c b/drivers/rtc/max6900.c index b35186579a5..11928839dcf 100644 --- a/drivers/rtc/max6900.c +++ b/drivers/rtc/max6900.c @@ -14,6 +14,7 @@ #include #include #include +#include #ifndef CONFIG_SYS_I2C_RTC_ADDR #define CONFIG_SYS_I2C_RTC_ADDR 0x50 diff --git a/drivers/rtc/mvrtc.c b/drivers/rtc/mvrtc.c index 94a065379c9..6f49505d4eb 100644 --- a/drivers/rtc/mvrtc.c +++ b/drivers/rtc/mvrtc.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "mvrtc.h" /* This RTC does not support century, so we assume 20 */ diff --git a/drivers/rtc/rv3029.c b/drivers/rtc/rv3029.c index 5e1689a91d9..9be58425bfb 100644 --- a/drivers/rtc/rv3029.c +++ b/drivers/rtc/rv3029.c @@ -15,6 +15,7 @@ #include #include #include +#include #define RTC_RV3029_PAGE_LEN 7 diff --git a/drivers/rtc/s35392a.c b/drivers/rtc/s35392a.c index 3bfe481403d..80f55c86233 100644 --- a/drivers/rtc/s35392a.c +++ b/drivers/rtc/s35392a.c @@ -23,6 +23,7 @@ #include #include #include +#include #define S35390A_CHIP_ADDR 0x30 -- cgit v1.2.3 From cd93d625fd751d55c729c78b10f82109d56a5f1d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 10 May 2020 11:40:13 -0600 Subject: common: Drop linux/bitops.h from common header Move this uncommon header out of the common header. Signed-off-by: Simon Glass --- drivers/rtc/ds3232.c | 1 + drivers/rtc/rv3029.c | 1 + drivers/rtc/rv8803.c | 1 + drivers/rtc/rx8010sj.c | 1 + drivers/rtc/stm32_rtc.c | 1 + 5 files changed, 5 insertions(+) (limited to 'drivers/rtc') diff --git a/drivers/rtc/ds3232.c b/drivers/rtc/ds3232.c index e3b3579c4aa..0a30e0eabb4 100644 --- a/drivers/rtc/ds3232.c +++ b/drivers/rtc/ds3232.c @@ -9,6 +9,7 @@ #include #include #include +#include /* * RTC register addresses diff --git a/drivers/rtc/rv3029.c b/drivers/rtc/rv3029.c index 9be58425bfb..3afe5b2fdd6 100644 --- a/drivers/rtc/rv3029.c +++ b/drivers/rtc/rv3029.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #define RTC_RV3029_PAGE_LEN 7 diff --git a/drivers/rtc/rv8803.c b/drivers/rtc/rv8803.c index 7f56b155fc3..acd50c65648 100644 --- a/drivers/rtc/rv8803.c +++ b/drivers/rtc/rv8803.c @@ -16,6 +16,7 @@ #include #include #include +#include /* * RTC register addresses diff --git a/drivers/rtc/rx8010sj.c b/drivers/rtc/rx8010sj.c index 82c5185e2e5..d513561b820 100644 --- a/drivers/rtc/rx8010sj.c +++ b/drivers/rtc/rx8010sj.c @@ -21,6 +21,7 @@ #include #include #include +#include /*---------------------------------------------------------------------*/ /* #undef DEBUG_RTC */ diff --git a/drivers/rtc/stm32_rtc.c b/drivers/rtc/stm32_rtc.c index 3e12f57ce0b..f9db318af1d 100644 --- a/drivers/rtc/stm32_rtc.c +++ b/drivers/rtc/stm32_rtc.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #define STM32_RTC_TR 0x00 -- cgit v1.2.3