From 2d9c0bf8a5ae19834a53ecf283e8cafcab13018b Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Thu, 10 Dec 2015 11:48:10 +0000 Subject: [PATCH] platform: adding default big core for ARM platforms. Since for specific platforms (Juno/TC2) we know what the big core is, we can set the big_core default so it doesn't have to be specified by the user. Also remove validation prior to being updated from target and setting little_core based on the value of big_core rather than by indexing into core_names. --- devlib/platform/__init__.py | 7 ++++--- devlib/platform/arm.py | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/devlib/platform/__init__.py b/devlib/platform/__init__.py index 4c76472..cd92479 100644 --- a/devlib/platform/__init__.py +++ b/devlib/platform/__init__.py @@ -25,7 +25,6 @@ class Platform(object): self.logger = logging.getLogger(self.name) if not self.core_clusters and self.core_names: self._set_core_clusters_from_core_names() - self._validate() def init_target_connection(self, target): # May be ovewritten by subclasses to provide target-specific @@ -76,6 +75,8 @@ class Platform(object): raise ValueError(message.format(self.big_core, ', '.join(set(self.core_names)))) if self.big_core: - little_idx = self.core_clusters.index(min(self.core_clusters)) - self.little_core = self.core_names[little_idx] + for core in self.core_names: + if core != self.big_core: + self.little_core = core + break diff --git a/devlib/platform/arm.py b/devlib/platform/arm.py index 037c9f0..e305dd1 100644 --- a/devlib/platform/arm.py +++ b/devlib/platform/arm.py @@ -174,6 +174,7 @@ class Juno(VersatileExpressPlatform): baudrate=115200, bootloader='u-boot', hard_reset_method='dtr', + big_core='a57', **kwargs ): super(Juno, self).__init__('juno', @@ -181,6 +182,7 @@ class Juno(VersatileExpressPlatform): baudrate=baudrate, bootloader=bootloader, hard_reset_method=hard_reset_method, + big_core='a57', **kwargs) @@ -191,6 +193,7 @@ class TC2(VersatileExpressPlatform): baudrate=38400, bootloader='bootmon', hard_reset_method='reboottxt', + big_core='a15', **kwargs ): super(TC2, self).__init__('tc2', @@ -198,6 +201,7 @@ class TC2(VersatileExpressPlatform): baudrate=baudrate, bootloader=bootloader, hard_reset_method=hard_reset_method, + big_core='a15', **kwargs)