summaryrefslogtreecommitdiffstats
path: root/kernel/arch/xtensa/platforms
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/arch/xtensa/platforms')
-rw-r--r--kernel/arch/xtensa/platforms/iss/network.c12
-rw-r--r--kernel/arch/xtensa/platforms/iss/setup.c2
-rw-r--r--kernel/arch/xtensa/platforms/iss/simdisk.c13
-rw-r--r--kernel/arch/xtensa/platforms/xt2000/setup.c2
-rw-r--r--kernel/arch/xtensa/platforms/xtfpga/include/platform/hardware.h6
-rw-r--r--kernel/arch/xtensa/platforms/xtfpga/setup.c2
6 files changed, 21 insertions, 16 deletions
diff --git a/kernel/arch/xtensa/platforms/iss/network.c b/kernel/arch/xtensa/platforms/iss/network.c
index 17b1ef323..976a38594 100644
--- a/kernel/arch/xtensa/platforms/iss/network.c
+++ b/kernel/arch/xtensa/platforms/iss/network.c
@@ -105,13 +105,17 @@ static char *split_if_spec(char *str, ...)
va_start(ap, str);
while ((arg = va_arg(ap, char**)) != NULL) {
- if (*str == '\0')
+ if (*str == '\0') {
+ va_end(ap);
return NULL;
+ }
end = strchr(str, ',');
if (end != str)
*arg = str;
- if (end == NULL)
+ if (end == NULL) {
+ va_end(ap);
return NULL;
+ }
*end++ = '\0';
str = end;
}
@@ -681,6 +685,4 @@ static int iss_net_init(void)
return 1;
}
-
-module_init(iss_net_init);
-
+device_initcall(iss_net_init);
diff --git a/kernel/arch/xtensa/platforms/iss/setup.c b/kernel/arch/xtensa/platforms/iss/setup.c
index da7d18240..391820539 100644
--- a/kernel/arch/xtensa/platforms/iss/setup.c
+++ b/kernel/arch/xtensa/platforms/iss/setup.c
@@ -61,7 +61,9 @@ void platform_restart(void)
#if XCHAL_NUM_IBREAK > 0
"wsr a2, ibreakenable\n\t"
#endif
+#if XCHAL_HAVE_LOOPS
"wsr a2, lcount\n\t"
+#endif
"movi a2, 0x1f\n\t"
"wsr a2, ps\n\t"
"isync\n\t"
diff --git a/kernel/arch/xtensa/platforms/iss/simdisk.c b/kernel/arch/xtensa/platforms/iss/simdisk.c
index 48eebacdf..3c3ace2c4 100644
--- a/kernel/arch/xtensa/platforms/iss/simdisk.c
+++ b/kernel/arch/xtensa/platforms/iss/simdisk.c
@@ -101,8 +101,9 @@ static void simdisk_transfer(struct simdisk *dev, unsigned long sector,
spin_unlock(&dev->lock);
}
-static int simdisk_xfer_bio(struct simdisk *dev, struct bio *bio)
+static blk_qc_t simdisk_make_request(struct request_queue *q, struct bio *bio)
{
+ struct simdisk *dev = q->queuedata;
struct bio_vec bvec;
struct bvec_iter iter;
sector_t sector = bio->bi_iter.bi_sector;
@@ -116,17 +117,11 @@ static int simdisk_xfer_bio(struct simdisk *dev, struct bio *bio)
sector += len;
__bio_kunmap_atomic(buffer);
}
- return 0;
-}
-static void simdisk_make_request(struct request_queue *q, struct bio *bio)
-{
- struct simdisk *dev = q->queuedata;
- int status = simdisk_xfer_bio(dev, bio);
- bio_endio(bio, status);
+ bio_endio(bio);
+ return BLK_QC_T_NONE;
}
-
static int simdisk_open(struct block_device *bdev, fmode_t mode)
{
struct simdisk *dev = bdev->bd_disk->private_data;
diff --git a/kernel/arch/xtensa/platforms/xt2000/setup.c b/kernel/arch/xtensa/platforms/xt2000/setup.c
index b90555cb8..87678961a 100644
--- a/kernel/arch/xtensa/platforms/xt2000/setup.c
+++ b/kernel/arch/xtensa/platforms/xt2000/setup.c
@@ -72,7 +72,9 @@ void platform_restart(void)
#if XCHAL_NUM_IBREAK > 0
"wsr a2, ibreakenable\n\t"
#endif
+#if XCHAL_HAVE_LOOPS
"wsr a2, lcount\n\t"
+#endif
"movi a2, 0x1f\n\t"
"wsr a2, ps\n\t"
"isync\n\t"
diff --git a/kernel/arch/xtensa/platforms/xtfpga/include/platform/hardware.h b/kernel/arch/xtensa/platforms/xtfpga/include/platform/hardware.h
index 0a55bb9c5..dbeea2b44 100644
--- a/kernel/arch/xtensa/platforms/xtfpga/include/platform/hardware.h
+++ b/kernel/arch/xtensa/platforms/xtfpga/include/platform/hardware.h
@@ -12,13 +12,15 @@
* This file contains the hardware configuration of the XTAVNET boards.
*/
+#include <asm/types.h>
+
#ifndef __XTENSA_XTAVNET_HARDWARE_H
#define __XTENSA_XTAVNET_HARDWARE_H
/* Memory configuration. */
-#define PLATFORM_DEFAULT_MEM_START CONFIG_DEFAULT_MEM_START
-#define PLATFORM_DEFAULT_MEM_SIZE CONFIG_DEFAULT_MEM_SIZE
+#define PLATFORM_DEFAULT_MEM_START __XTENSA_UL(CONFIG_DEFAULT_MEM_START)
+#define PLATFORM_DEFAULT_MEM_SIZE __XTENSA_UL(CONFIG_DEFAULT_MEM_SIZE)
/* Interrupt configuration. */
diff --git a/kernel/arch/xtensa/platforms/xtfpga/setup.c b/kernel/arch/xtensa/platforms/xtfpga/setup.c
index b4cf70e53..e9f65f79c 100644
--- a/kernel/arch/xtensa/platforms/xtfpga/setup.c
+++ b/kernel/arch/xtensa/platforms/xtfpga/setup.c
@@ -63,7 +63,9 @@ void platform_restart(void)
#if XCHAL_NUM_IBREAK > 0
"wsr a2, ibreakenable\n\t"
#endif
+#if XCHAL_HAVE_LOOPS
"wsr a2, lcount\n\t"
+#endif
"movi a2, 0x1f\n\t"
"wsr a2, ps\n\t"
"isync\n\t"