Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d3eddc1c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ssbi: Move ssbi struct to header file"

parents 44680376 fc53f4ff
Loading
Loading
Loading
Loading
+2 −13
Original line number Diff line number Diff line
@@ -147,15 +147,6 @@ int mode_2_ram_array[GENI_RAM_SIZE] = {
	0x00041017, 0x00101000, 0x00001200, 0x0008201C, 0x00000000
};

struct ssbi {
	struct device		*slave;
	void __iomem		*base;
	spinlock_t		lock;
	enum ssbi_controller_type controller_type;
	int (*read)(struct ssbi *, u16 addr, u8 *buf, int len);
	int (*write)(struct ssbi *, u16 addr, u8 *buf, int len);
};

#define to_ssbi(dev)	platform_get_drvdata(to_platform_device(dev))

static inline u32 ssbi_readl(struct ssbi *ssbi, u32 reg)
@@ -424,7 +415,7 @@ int ssbi_write(struct device *dev, u16 addr, u8 *buf, int len)
}
EXPORT_SYMBOL_GPL(ssbi_write);

static void  set_ssbi_mode_2(void __iomem *geni_offset)
void  set_ssbi_mode_2(void __iomem *geni_offset)
{
	int i;

@@ -451,7 +442,7 @@ static void set_ssbi_mode_2(void __iomem *geni_offset)
			GENI_ARB_CHNL_CONFIG_ADDDR + 4 * i);
}

static void  set_ssbi_mode_1(void __iomem *geni_offset)
void  set_ssbi_mode_1(void __iomem *geni_offset)
{
	int i;

@@ -523,10 +514,8 @@ static int ssbi_probe(struct platform_device *pdev)
		ssbi->controller_type = MSM_SBI_CTRL_PMIC_ARBITER;
	else if (strcmp(type, "geni-ssbi-arbiter") == 0) {
		ssbi->controller_type = FSM_SBI_CTRL_GENI_SSBI_ARBITER;
		set_ssbi_mode_1(ssbi->base);
	} else if (strcmp(type, "geni-ssbi2-arbiter") == 0) {
		ssbi->controller_type = FSM_SBI_CTRL_GENI_SSBI2_ARBITER;
		set_ssbi_mode_2(ssbi->base);
	} else {
		pr_err("Unknown qcom,controller-type\n");
		ret = -EINVAL;
+12 −1
Original line number Diff line number Diff line
/* Copyright (C) 2010 Google, Inc.
 * Copyright (c) 2011,2013, The Linux Foundation. All rights reserved.
 * Copyright (c) 2011,2013-2014 The Linux Foundation. All rights reserved.
 * Author: Dima Zavin <dima@android.com>
 *
 * This program is free software; you can redistribute it and/or modify
@@ -35,6 +35,17 @@ struct ssbi_platform_data {
	enum ssbi_controller_type controller_type;
};

struct ssbi {
	struct device           *slave;
	void __iomem            *base;
	spinlock_t              lock;
	enum ssbi_controller_type controller_type;
	int (*read)(struct ssbi *, u16 addr, u8 *buf, int len);
	int (*write)(struct ssbi *, u16 addr, u8 *buf, int len);
};

int ssbi_write(struct device *dev, u16 addr, u8 *buf, int len);
int ssbi_read(struct device *dev, u16 addr, u8 *buf, int len);
void  set_ssbi_mode_1(void __iomem *geni_offset);
void  set_ssbi_mode_2(void __iomem *geni_offset);
#endif