diff mbox

[U-Boot,2/3] arm: mvebu: a38x: Add const to some function calls

Message ID 1445622787-18995-3-git-send-email-kevin.smith@elecsyscorp.com
State Accepted
Delegated to: Stefan Roese
Headers show

Commit Message

Kevin Smith Oct. 23, 2015, 5:53 p.m. UTC
Functions that do not modify the pointer passed should declare it
as const.

Signed-off-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Dirk Eibach <eibach@gdsys.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
---
 arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c            | 2 +-
 arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h            | 2 +-
 arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c | 6 +++---
 arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.h | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)
diff mbox

Patch

diff --git a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c
index 5f223f9..9947412 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c
+++ b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c
@@ -13,7 +13,7 @@ 
 #include "ctrl_pex.h"
 #include "sys_env_lib.h"
 
-int hws_pex_config(struct serdes_map *serdes_map)
+int hws_pex_config(const struct serdes_map *serdes_map)
 {
 	u32 pex_idx, tmp, next_busno, first_busno, temp_pex_reg,
 	    temp_reg, addr, dev_id, ctrl_mode;
diff --git a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h
index df395bf..16ee4cb 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h
+++ b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h
@@ -78,7 +78,7 @@ 
 #define PEX_STATUS_AND_COMMAND		0x004
 #define PXSAC_MABORT			BIT(29) /* Recieved Master Abort */
 
-int hws_pex_config(struct serdes_map *serdes_map);
+int hws_pex_config(const struct serdes_map *serdes_map);
 int pex_local_bus_num_set(u32 pex_if, u32 bus_num);
 int pex_local_dev_num_set(u32 pex_if, u32 dev_num);
 u32 pex_config_read(u32 pex_if, u32 bus, u32 dev, u32 func, u32 reg_off);
diff --git a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c
index c95231b..24e9af6 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c
+++ b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c
@@ -1362,7 +1362,7 @@  enum serdes_seq serdes_type_and_speed_to_speed_seq(enum serdes_type serdes_type,
 	return seq_id;
 }
 
-void print_topology_details(struct serdes_map *serdes_map_array)
+void print_topology_details(const struct serdes_map *serdes_map_array)
 {
 	u32 lane_num;
 
@@ -1462,7 +1462,7 @@  int serdes_polarity_config(u32 serdes_num, int is_rx)
 	return MV_OK;
 }
 
-int hws_power_up_serdes_lanes(struct serdes_map *serdes_config_map)
+int hws_power_up_serdes_lanes(const struct serdes_map *serdes_config_map)
 {
 	u32 serdes_id, serdes_lane_num;
 	enum ref_clock ref_clock;
@@ -2145,7 +2145,7 @@  int hws_ref_clock_set(u32 serdes_num, enum serdes_type serdes_type,
  * RETURNS:              MV_OK           - for success
  *                       MV_BAD_PARAM    - for fail
  */
-int hws_pex_tx_config_seq(struct serdes_map *serdes_map)
+int hws_pex_tx_config_seq(const struct serdes_map *serdes_map)
 {
 	enum serdes_mode serdes_mode;
 	u32 serdes_lane_id, serdes_lane_hw_num;
diff --git a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.h b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.h
index 2508721..5f3b9d8 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.h
+++ b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.h
@@ -220,7 +220,7 @@  enum serdes_seq serdes_type_and_speed_to_speed_seq(enum serdes_type serdes_type,
 						   enum serdes_speed baud_rate);
 int hws_serdes_seq_init(void);
 int hws_serdes_seq_db_init(void);
-int hws_power_up_serdes_lanes(struct serdes_map *serdes_config_map);
+int hws_power_up_serdes_lanes(const struct serdes_map *serdes_config_map);
 int hws_ctrl_high_speed_serdes_phy_config(void);
 int serdes_power_up_ctrl(u32 serdes_num, int serdes_power_up,
 			 enum serdes_type serdes_type,
@@ -244,7 +244,7 @@  u32 hws_serdes_get_ref_clock_val(enum serdes_type serdes_type);
 u32 hws_serdes_get_max_lane(void);
 int hws_get_ext_base_addr(u32 serdes_num, u32 base_addr, u32 unit_base_offset,
 			  u32 *unit_base_reg, u32 *unit_offset);
-int hws_pex_tx_config_seq(struct serdes_map *serdes_map);
+int hws_pex_tx_config_seq(const struct serdes_map *serdes_map);
 u32 hws_get_physical_serdes_num(u32 serdes_num);
 int hws_is_serdes_active(u8 lane_num);